import { Box, ButtonBase, Typography, useTheme, Modal } from "@mui/material"; import { useState } from "react"; import { EmojiPicker } from "./EmojiPicker"; interface Props { emoji: string; onEmojiSelect?: (emoji: string) => void; } export const OwnEmojiPicker = ({ emoji = "", onEmojiSelect }: Props) => { const theme = useTheme(); const [isPickerOpen, setIsPickerOpen] = useState(false); const handleEmojiSelect = (emojiData: any) => { onEmojiSelect?.(emojiData.native); setIsPickerOpen(false); }; const handleClick = (e: React.MouseEvent) => { e.stopPropagation(); setIsPickerOpen(true); }; const handleClose = (e: React.MouseEvent) => { e.stopPropagation(); setIsPickerOpen(false); }; return ( <> {emoji} e.stopPropagation()} sx={{ bgcolor: "background.paper", borderRadius: 2, p: 2, boxShadow: 24, }} > ); };