import React from "react"; import clsx from "clsx"; import { Callout } from "@gland/react/popover"; import { icons } from "../../icons"; import { toolClasses as classes, toolNormalBtn } from "../style"; import { preventDefault } from "@gland/function/preventDefault"; import { BtnTip } from "./widget"; import { emojiList, emojiMap } from "../../emoji"; import { ToolAttr } from "../utils"; export function SmileWink(props: { attr: ToolAttr }) { const [show, setShow] = React.useState(false); const attr = React.useRef({} as { root }).current; const lang = props.attr.lang; return (
(attr.root = r)} onClick={() => { setShow(!show); }} >
); } const EmojiSelect = React.memo(function (props: { onSelect; lang }) { return (
{emojiList.map(function (title) { return ( { props.onSelect(title); }} > ); })}
); });