mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-14 16:19:15 +08:00
7104513a84
* docs: init * docs: semantic block * docs: part of demo * docs: modal * docs: slider * docs: space * docs: all sementic * docs: clean up * chore: fix lint * chore: clean up * chore: update script * test: fix test case * test: update testcase
44 lines
851 B
TypeScript
44 lines
851 B
TypeScript
import React from 'react';
|
|
import { Avatar, Badge } from 'antd';
|
|
|
|
import SemanticPreview from '../../../.dumi/components/SemanticPreview';
|
|
import useLocale from '../../../.dumi/hooks/useLocale';
|
|
|
|
const locales = {
|
|
cn: {
|
|
root: '根节点',
|
|
indicator: '指示器节点',
|
|
},
|
|
en: {
|
|
root: 'Root element',
|
|
indicator: 'Indicator element',
|
|
},
|
|
};
|
|
|
|
const App: React.FC = () => {
|
|
const [locale] = useLocale(locales);
|
|
|
|
return (
|
|
<SemanticPreview
|
|
semantics={[
|
|
{
|
|
name: 'root',
|
|
desc: locale.root,
|
|
version: '5.7.0',
|
|
},
|
|
{
|
|
name: 'indicator',
|
|
desc: locale.indicator,
|
|
version: '5.7.0',
|
|
},
|
|
]}
|
|
>
|
|
<Badge count={5}>
|
|
<Avatar shape="square" size="large" />
|
|
</Badge>
|
|
</SemanticPreview>
|
|
);
|
|
};
|
|
|
|
export default App;
|