From 2cc6579e80807c9e43d9c8312a015b4500623f61 Mon Sep 17 00:00:00 2001 From: harshithpabbati Date: Thu, 30 Dec 2021 21:31:14 +0530 Subject: [PATCH] Allow to send emojis in chat --- .../fitness-demo/components/Call/ChatAside.js | 78 ++++++++++++++++++- custom/shared/components/Button/Button.js | 7 ++ custom/shared/icons/emoji-sm.svg | 5 ++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 custom/shared/icons/emoji-sm.svg diff --git a/custom/fitness-demo/components/Call/ChatAside.js b/custom/fitness-demo/components/Call/ChatAside.js index 706cb12..74d0b53 100644 --- a/custom/fitness-demo/components/Call/ChatAside.js +++ b/custom/fitness-demo/components/Call/ChatAside.js @@ -4,6 +4,7 @@ import Button from '@custom/shared/components/Button'; import { TextInput } from '@custom/shared/components/Input'; import { useParticipants } from '@custom/shared/contexts/ParticipantsProvider'; import { useUIState } from '@custom/shared/contexts/UIStateProvider'; +import { ReactComponent as IconEmoji } from '@custom/shared/icons/emoji-sm.svg'; import { useChat } from '../../contexts/ChatProvider'; import { useMessageSound } from '../../hooks/useMessageSound'; @@ -16,6 +17,7 @@ export const ChatAside = () => { const { localParticipant } = useParticipants(); const [newMessage, setNewMessage] = useState(''); const playMessageSound = useMessageSound(); + const [showEmojis, setShowEmojis] = useState(false); const chatWindowRef = useRef(); @@ -57,7 +59,67 @@ export const ChatAside = () => { ))} + {showEmojis && ( +
+ + + + + + + +
+ )}