ant-design/components/space/demo/_semantic.tsx
2024-02-16 20:50:31 +08:00

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;