Selects custom color when created

This commit is contained in:
Josh Perez 2021-06-03 17:34:36 -04:00 committed by GitHub
parent 6d82acd23c
commit 53d6065c00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 158 additions and 79 deletions

View file

@ -4,17 +4,11 @@
import React from 'react';
import { Modal } from './Modal';
import { LocalizerType } from '../types/Util';
import { ConversationColorType } from '../types/Colors';
type PropsType = {
i18n: LocalizerType;
isChatColorEditorVisible: boolean;
renderChatColorPicker: (actions: {
setGlobalDefaultConversationColor: (
color: ConversationColorType
) => unknown;
}) => JSX.Element;
setGlobalDefaultConversationColor: (color: ConversationColorType) => unknown;
renderChatColorPicker: () => JSX.Element;
toggleChatColorEditor: () => unknown;
};
@ -22,7 +16,6 @@ export const GlobalModalContainer = ({
i18n,
isChatColorEditorVisible,
renderChatColorPicker,
setGlobalDefaultConversationColor,
toggleChatColorEditor,
}: PropsType): JSX.Element | null => {
if (isChatColorEditorVisible) {
@ -35,9 +28,7 @@ export const GlobalModalContainer = ({
onClose={toggleChatColorEditor}
title={i18n('ChatColorPicker__global-chat-color')}
>
{renderChatColorPicker({
setGlobalDefaultConversationColor,
})}
{renderChatColorPicker()}
</Modal>
);
}