File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
src/frontend/apps/impress/src/features/docs/doc-editor/components Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ import data from '@emoji-mart/data' ;
2
+ import Picker from '@emoji-mart/react' ;
3
+ import React from 'react' ;
4
+ import { useTranslation } from 'react-i18next' ;
5
+
6
+ import { Box } from '@/components' ;
7
+
8
+ interface EmojiPickerProps {
9
+ categories : string [ ] ;
10
+ custom : {
11
+ name : string ;
12
+ id : string ;
13
+ emojis : string [ ] ;
14
+ } [ ] ;
15
+ onClickOutside : ( ) => void ;
16
+ onEmojiSelect : ( { native } : { native : string } ) => void ;
17
+ }
18
+
19
+ export const EmojiPicker = ( {
20
+ categories,
21
+ custom,
22
+ onClickOutside,
23
+ onEmojiSelect,
24
+ } : EmojiPickerProps ) => {
25
+ const { i18n } = useTranslation ( ) ;
26
+
27
+ return (
28
+ < Box $position = "absolute" $zIndex = { 1000 } $margin = "2rem 0 0 0" >
29
+ < Picker
30
+ categories = { categories }
31
+ custom = { custom }
32
+ data = { data }
33
+ locale = { i18n . resolvedLanguage }
34
+ navPosition = "none"
35
+ onClickOutside = { onClickOutside }
36
+ onEmojiSelect = { onEmojiSelect }
37
+ previewPosition = "none"
38
+ skinTonePosition = "none"
39
+ theme = "light"
40
+ />
41
+ </ Box >
42
+ ) ;
43
+ } ;
You can’t perform that action at this time.
0 commit comments