0.0.2 • Published 3 years ago

@dock-ui/context-menu v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@dock-ui/context-menu

Base Style

Using ContextMenu component, you can make a context menu to replace original menu, and bind event on it.

RUNOOB 图标

Example Code

const menuList: MenuList[] = [
    {
        name: "Copy",
        hotKey: {
            key: ["ctrl", "c"],
            description: "Ctrl + C",
        },
    },
    {
        name: "Refresh",
        hotKey: {
            key: ["f5"],
            description: "F5",
        },
    },
    {
        name: "React",
        frontIcon: <img src={reactIcon} />,
    },
];

function App() {
    const ref = useRef(null);
    return (
        <div className="App" ref={ref}>
            <ContextMenu menuList={menuList} container={ref} />
        </div>
    );
}
0.0.2

3 years ago

0.0.1

3 years ago