mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
26 lines
774 B
TypeScript
26 lines
774 B
TypeScript
import React, { useState } from 'react';
|
|
import { SmileOutlined } from '@ant-design/icons';
|
|
import { Button, ConfigProvider, 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: '12px' }} type="primary" onClick={() => setPrefixCls('dark')}>
|
|
toggle prefixCls
|
|
</Button>
|
|
<br />
|
|
<ConfigProvider prefixCls={prefixCls} iconPrefixCls="bamboo">
|
|
<SmileOutlined />
|
|
<Select style={{ width: 120 }} />
|
|
</ConfigProvider>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default App;
|