mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 13:18:04 +08:00
30 lines
688 B
TypeScript
30 lines
688 B
TypeScript
import React from 'react';
|
|
import { Button, Space } from 'antd';
|
|
|
|
import SemanticPreview from '../../../.dumi/components/SemanticPreview';
|
|
import useLocale from '../../../.dumi/hooks/useLocale';
|
|
|
|
const locales = {
|
|
cn: {
|
|
item: '包裹的子组件',
|
|
},
|
|
en: {
|
|
item: 'Wrapped item element',
|
|
},
|
|
};
|
|
|
|
const App: React.FC = () => {
|
|
const [locale] = useLocale(locales);
|
|
return (
|
|
<SemanticPreview semantics={[{ name: 'item', desc: locale.item, version: '5.6.0' }]}>
|
|
<Space>
|
|
<Button type="primary">Primary</Button>
|
|
<Button>Default</Button>
|
|
<Button type="dashed">Dashed</Button>
|
|
</Space>
|
|
</SemanticPreview>
|
|
);
|
|
};
|
|
|
|
export default App;
|