The menu provides categories and functions, and uses a multi-level structure to organize and arrange the site structure.
Nest the MenuItem component in the Menu component.
2
const { Add, Stop, Pen, Trash } = KubeIcon;
3
const clickCallback = () => {
4
console.log('you click me')
7
<Card style={{ width: '230px' }}>
9
<MenuLabel>menu label</MenuLabel>
10
<MenuItem icon={<Add />} onClick={clickCallback}>Add</MenuItem>
11
<MenuItem icon={<Stop />}>Stop</MenuItem>
12
<MenuItem icon={<Pen />}>Edit</MenuItem>
14
<MenuItem icon={<Trash />}>Delete</MenuItem>
2
const { Add, Stop, Pen, Trash } = KubeIcon;
4
<Card style={{ width: '230px' }}>
6
<MenuLabel>menu label</MenuLabel>
7
<MenuItem disabled icon={<Add />}>Add</MenuItem>
8
<MenuItem icon={<Stop />}>Stop</MenuItem>
9
<MenuItem icon={<Pen />}>Edit</MenuItem>
11
<MenuItem icon={<Trash />}>Delete</MenuItem>