2024-02-05 11:45:42 +08:00
|
|
|
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 (
|
2024-02-16 20:50:31 +08:00
|
|
|
<SemanticPreview semantics={[{ name: 'item', desc: locale.item, version: '5.6.0' }]}>
|
2024-02-05 11:45:42 +08:00
|
|
|
<Space>
|
|
|
|
<Button type="primary">Primary</Button>
|
|
|
|
<Button>Default</Button>
|
|
|
|
<Button type="dashed">Dashed</Button>
|
|
|
|
</Space>
|
|
|
|
</SemanticPreview>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|