import React from 'react';
import { DeleteOutlined, DownOutlined, EditOutlined, SaveOutlined } from '@ant-design/icons';
import { Dropdown, MenuProps, Space } from 'antd';
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
import useLocale from '../../../.dumi/hooks/useLocale';
const locales = {
cn: {
root: '根元素',
itemTitle: '菜单标题',
item: '菜单项',
itemContent: '菜单项内容',
itemIcon: '菜单项图标',
},
en: {
root: 'Root element',
itemTitle: 'Item title element',
item: 'Item element',
itemContent: 'Item content element',
itemIcon: 'Item icon element',
},
};
const items: MenuProps['items'] = [
{
key: '1',
type: 'group',
label: 'Group title',
children: [
{
key: '1-1',
label: '1st menu item',
icon: ,
},
{
key: '1-2',
label: '2nd menu item',
icon: ,
},
],
},
{
key: 'SubMenu',
label: 'SubMenu',
children: [
{
key: 'g1',
label: 'Item 1',
type: 'group',
children: [
{ key: '1', label: 'Option 1' },
{ key: '2', label: 'Option 2' },
],
},
],
},
{
key: '3',
type: 'divider',
},
{
key: '4',
label: 'Delete',
icon: ,
danger: true,
},
];
const Block: React.FC = (props: any) => {
const divRef = React.useRef(null);
return (
);
};
const App: React.FC = () => {
const [locale] = useLocale(locales);
return (
);
};
export default App;