session-desktop/ts/components/session/conversation/SessionEmojiPanel.tsx

45 lines
999 B
TypeScript
Raw Normal View History

2020-02-19 02:05:48 +01:00
import React from 'react';
2020-03-12 07:15:02 +01:00
import classNames from 'classnames';
import { Picker } from 'emoji-mart';
2020-07-21 06:43:46 +02:00
import { Constants } from '../../../session';
2020-03-12 07:15:02 +01:00
interface Props {
onEmojiClicked: (emoji: any) => void;
show: boolean;
}
2020-02-19 02:05:48 +01:00
interface State {
// FIXME Use Emoji-Mart categories
2020-02-27 00:01:18 +01:00
category: null;
2020-02-19 02:05:48 +01:00
}
export class SessionEmojiPanel extends React.Component<Props, State> {
2020-03-12 07:15:02 +01:00
constructor(props: Props) {
2020-02-19 02:05:48 +01:00
super(props);
this.state = {
category: null,
};
}
2020-07-16 08:39:35 +02:00
public render() {
2020-03-12 07:15:02 +01:00
const { onEmojiClicked, show } = this.props;
return (
<div className={classNames('session-emoji-panel', show && 'show')}>
<Picker
2020-07-20 09:30:26 +02:00
backgroundImageFn={() => './images/emoji/emoji-sheet-twitter-32.png'}
2020-07-17 04:07:06 +02:00
set={'twitter'}
sheetSize={32}
2020-03-12 07:15:02 +01:00
darkMode={true}
2020-07-21 06:43:46 +02:00
color={Constants.UI.COLORS.GREEN}
2020-03-12 07:15:02 +01:00
showPreview={true}
title={''}
onSelect={onEmojiClicked}
autoFocus={true}
/>
</div>
);
2020-02-19 02:05:48 +01:00
}
}