Conversation Colors
This commit is contained in:
parent
b63d8e908c
commit
28f016ce48
128 changed files with 3997 additions and 1207 deletions
33
ts/state/smart/GlobalModalContainer.tsx
Normal file
33
ts/state/smart/GlobalModalContainer.tsx
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import { GlobalModalContainer } from '../../components/GlobalModalContainer';
|
||||
import { StateType } from '../reducer';
|
||||
import { getIntl } from '../selectors/user';
|
||||
import { SmartChatColorPicker } from './ChatColorPicker';
|
||||
import { ConversationColorType } from '../../types/Colors';
|
||||
|
||||
function renderChatColorPicker({
|
||||
setAllConversationColors,
|
||||
}: {
|
||||
setAllConversationColors: (color: ConversationColorType) => unknown;
|
||||
}): JSX.Element {
|
||||
return (
|
||||
<SmartChatColorPicker isInModal onSelectColor={setAllConversationColors} />
|
||||
);
|
||||
}
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
return {
|
||||
...state.globalModals,
|
||||
i18n: getIntl(state),
|
||||
renderChatColorPicker,
|
||||
};
|
||||
};
|
||||
|
||||
const smart = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
export const SmartGlobalModalContainer = smart(GlobalModalContainer);
|
Loading…
Add table
Add a link
Reference in a new issue