You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
847 B

import React from 'react';
import { Switch, ConfigProvider, Space, Checkbox, Radio, Row, Col } from 'antd';
export default () => {
const [checked, setChecked] = React.useState(false);
React.useEffect(() => {
const id = setInterval(() => {
setChecked((prev) => !prev);
}, 500);
return () => {
clearInterval(id);
};
}, []);
const nodes = (
<Space>
<Checkbox checked={checked}>Checkbox</Checkbox>
<Radio checked={checked}>Radio</Radio>
<Switch checked={checked} />
</Space>
);
return (
<Row gutter={[24, 24]}>
<Col span={24}>{nodes}</Col>
<Col span={24}>
<ConfigProvider
theme={{
token: {
motion: false,
},
}}
>
{nodes}
</ConfigProvider>
</Col>
</Row>
);
};