mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-16 23:21:00 +08:00
34 lines
740 B
TypeScript
34 lines
740 B
TypeScript
import React from 'react';
|
|
import { Pagination } from 'antd';
|
|
|
|
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
|
|
import useLocale from '../../../.dumi/hooks/useLocale';
|
|
|
|
const locales = {
|
|
cn: {
|
|
root: '根元素',
|
|
item: 'Item 元素',
|
|
},
|
|
en: {
|
|
root: 'Root element',
|
|
item: 'Item element',
|
|
},
|
|
};
|
|
|
|
const App: React.FC = () => {
|
|
const [locale] = useLocale(locales);
|
|
return (
|
|
<SemanticPreview
|
|
componentName="Pagination"
|
|
semantics={[
|
|
{ name: 'root', desc: locale.root, version: '6.0.0' },
|
|
{ name: 'item', desc: locale.item, version: '6.0.0' },
|
|
]}
|
|
>
|
|
<Pagination defaultCurrent={1} total={50} />
|
|
</SemanticPreview>
|
|
);
|
|
};
|
|
|
|
export default App;
|