import React from 'react'; import { Button, ColorPicker, ConfigProvider, Divider, Form, Input, InputNumber, Space, Switch, } from 'antd'; import type { ColorPickerProps, GetProp } from 'antd'; type Color = Extract, { cleared: any }>; type ThemeData = { borderRadius: number; colorPrimary: string; Button?: { colorPrimary: string; algorithm?: boolean; }; }; const defaultData: ThemeData = { borderRadius: 6, colorPrimary: '#1677ff', Button: { colorPrimary: '#00B96B', }, }; export default () => { const [form] = Form.useForm(); const [data, setData] = React.useState(defaultData); return (
{ setData({ ...allValues, }); }} name="theme" initialValues={defaultData} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} > color.toHexString()} > color.toHexString()} >
); };