import { Button, Dropdown, Menu } from "antd"; import { useState } from "react"; import { EditOutlined, CopyOutlined, MoreOutlined } from "@ant-design/icons"; interface ISentEditMenu { children?: React.ReactNode; onModeChange?: Function; } const Widget = ({ children, onModeChange }: ISentEditMenu) => { const [isHover, setIsHover] = useState(false); const menu = ( { console.log(e); }} items={[ { key: "en", label: "时间线", }, { key: "zh-Hans", label: "分享", }, ]} /> ); return (
{ setIsHover(true); }} onMouseLeave={() => { setIsHover(false); }} >
{children}
); }; export default Widget;