File size: 914 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
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;
|