mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 03:14:07 +08:00
31b2e53755
* fix: classname of the Radio & Checkbox would not follow CP * test: add test case * test: add test case * test: update path * fix: fix * chore: revert * chore: revert * chore: revert * chore: revert * chore: revert
32 lines
914 B
TypeScript
32 lines
914 B
TypeScript
import React, { useState } from 'react';
|
|
import { SmileOutlined } from '@ant-design/icons';
|
|
import { Button, Checkbox, ConfigProvider, Radio, Select } from 'antd';
|
|
|
|
// Ant Design site use `es` module for view
|
|
// but do not replace related lib `lib` with `es`
|
|
// which do not show correct in site.
|
|
// We may need do convert in site also.
|
|
const App: React.FC = () => {
|
|
const [prefixCls, setPrefixCls] = useState('light');
|
|
return (
|
|
<>
|
|
<Button
|
|
style={{ marginBottom: 12 }}
|
|
type="primary"
|
|
onClick={() => setPrefixCls(prefixCls === 'light' ? 'dark' : 'light')}
|
|
>
|
|
toggle prefixCls
|
|
</Button>
|
|
<br />
|
|
<ConfigProvider prefixCls={prefixCls} iconPrefixCls="bamboo">
|
|
<SmileOutlined />
|
|
<Select style={{ width: 120 }} />
|
|
<Radio>test</Radio>
|
|
<Checkbox>test</Checkbox>
|
|
</ConfigProvider>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default App;
|