2023-06-05 16:16:43 +08:00
|
|
|
import React from 'react';
|
2023-07-28 16:17:43 +08:00
|
|
|
import { ConfigProvider, Radio, Space } from 'antd';
|
2023-06-05 16:16:43 +08:00
|
|
|
|
|
|
|
const App: React.FC = () => (
|
|
|
|
<ConfigProvider
|
|
|
|
theme={{
|
|
|
|
components: {
|
|
|
|
Radio: {
|
|
|
|
radioSize: 20,
|
|
|
|
dotSize: 10,
|
|
|
|
dotColorDisabled: 'grey',
|
|
|
|
buttonBg: '#f6ffed',
|
|
|
|
buttonCheckedBg: '#d9f7be',
|
|
|
|
buttonColor: '#faad14',
|
|
|
|
buttonPaddingInline: 20,
|
|
|
|
buttonCheckedBgDisabled: '#fffbe6',
|
|
|
|
buttonCheckedColorDisabled: '#ffe58f',
|
|
|
|
buttonSolidCheckedColor: '#ffa39e',
|
|
|
|
wrapperMarginInlineEnd: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Space direction="vertical">
|
|
|
|
<Radio checked>Test</Radio>
|
|
|
|
<Radio checked disabled>
|
|
|
|
Disabled
|
|
|
|
</Radio>
|
|
|
|
<Radio.Group defaultValue="a">
|
|
|
|
<Radio.Button value="a">Hangzhou</Radio.Button>
|
|
|
|
<Radio.Button value="b">Shanghai</Radio.Button>
|
|
|
|
<Radio.Button value="c">Beijing</Radio.Button>
|
|
|
|
<Radio.Button value="d">Chengdu</Radio.Button>
|
|
|
|
</Radio.Group>
|
|
|
|
<Radio.Group defaultValue="a" disabled>
|
|
|
|
<Radio.Button value="a">Hangzhou</Radio.Button>
|
|
|
|
<Radio.Button value="b">Shanghai</Radio.Button>
|
|
|
|
<Radio.Button value="c">Beijing</Radio.Button>
|
|
|
|
<Radio.Button value="d">Chengdu</Radio.Button>
|
|
|
|
</Radio.Group>
|
|
|
|
<Radio.Group defaultValue="a" buttonStyle="solid">
|
|
|
|
<Radio.Button value="a">Hangzhou</Radio.Button>
|
|
|
|
<Radio.Button value="b">Shanghai</Radio.Button>
|
|
|
|
<Radio.Button value="c">Beijing</Radio.Button>
|
|
|
|
<Radio.Button value="d">Chengdu</Radio.Button>
|
|
|
|
</Radio.Group>
|
|
|
|
</Space>
|
|
|
|
</ConfigProvider>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default App;
|