mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-22 22:48:29 +08:00
29 lines
660 B
TypeScript
29 lines
660 B
TypeScript
import React from 'react';
|
|
import { AntDesignOutlined } from '@ant-design/icons';
|
|
import { Button } from 'antd';
|
|
|
|
import SemanticPreview from '../../../.dumi/components/SemanticPreview';
|
|
import useLocale from '../../../.dumi/hooks/useLocale';
|
|
|
|
const locales = {
|
|
cn: {
|
|
icon: '图标元素',
|
|
},
|
|
en: {
|
|
icon: 'Icon element',
|
|
},
|
|
};
|
|
|
|
const App: React.FC = () => {
|
|
const [locale] = useLocale(locales);
|
|
return (
|
|
<SemanticPreview semantics={[{ name: 'icon', desc: locale.icon, version: '5.5.0' }]}>
|
|
<Button type="primary" icon={<AntDesignOutlined />}>
|
|
Ant Design
|
|
</Button>
|
|
</SemanticPreview>
|
|
);
|
|
};
|
|
|
|
export default App;
|