Selects custom color when created
This commit is contained in:
parent
6d82acd23c
commit
53d6065c00
8 changed files with 158 additions and 79 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue