diff --git a/packages/react-chat/src/components/Chat/ChatInput.tsx b/packages/react-chat/src/components/Chat/ChatInput.tsx index 41e7e49e..608caa71 100644 --- a/packages/react-chat/src/components/Chat/ChatInput.tsx +++ b/packages/react-chat/src/components/Chat/ChatInput.tsx @@ -10,6 +10,7 @@ import { GifIcon } from "../Icons/GifIcon"; import { PictureIcon } from "../Icons/PictureIcon"; import { StickerIcon } from "../Icons/StickerIcon"; import "emoji-mart/css/emoji-mart.css"; +import { Modal } from "../Modals/Modal"; type ChatInputProps = { theme: Theme; @@ -21,7 +22,7 @@ export function ChatInput({ theme, addMessage }: ChatInputProps) { const [showEmoji, setShowEmoji] = useState(false); const [inputHeight, setInputHeight] = useState(40); const [imageUint, setImageUint] = useState(undefined); - + const [showSizeLimit, setShowSizeLimit] = useState(false); useEffect(() => { window.addEventListener("click", () => setShowEmoji(false)); return () => { @@ -71,6 +72,14 @@ export function ChatInput({ theme, addMessage }: ChatInputProps) { return ( + setShowSizeLimit(false)} isVisible={showSizeLimit}> +
setShowSizeLimit(false)} + style={{ padding: "20px" }} + > + File size must be less than 1MB +
+
{showEmoji && (