Reactions: skin tone support
This commit is contained in:
parent
6a7d45b6fc
commit
c3ddedfde1
13 changed files with 307 additions and 141 deletions
29
ts/state/smart/ReactionPicker.tsx
Normal file
29
ts/state/smart/ReactionPicker.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
import * as React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { get } from 'lodash';
|
||||
import { StateType } from '../reducer';
|
||||
|
||||
import { getIntl } from '../selectors/user';
|
||||
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
import {
|
||||
ReactionPicker,
|
||||
Props,
|
||||
} from '../../components/conversation/ReactionPicker';
|
||||
|
||||
type ExternalProps = Omit<Props, 'skinTone' | 'i18n'>;
|
||||
|
||||
export const SmartReactionPicker = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
ExternalProps
|
||||
>((props, ref) => {
|
||||
const i18n = useSelector<StateType, LocalizerType>(getIntl);
|
||||
|
||||
const skinTone = useSelector<StateType, number>(state =>
|
||||
get(state, ['items', 'skinTone'], 0)
|
||||
);
|
||||
|
||||
return (
|
||||
<ReactionPicker ref={ref} skinTone={skinTone} i18n={i18n} {...props} />
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue