import * as React from 'react'; import { TinyColor } from '@ctrl/tinycolor'; import { Drawer, Form, Input, Button, InputNumber } from 'antd'; import { useIntl } from 'react-intl'; import { BugOutlined } from '@ant-design/icons'; import { DesignToken } from '../../../../components/_util/theme'; import defaultTheme from '../../../../components/_util/theme/default'; export interface ThemeConfigProps { defaultToken: DesignToken; onChangeTheme: (theme: DesignToken) => void; } export default ({ onChangeTheme, defaultToken }: ThemeConfigProps) => { const { formatMessage } = useIntl(); const [visible, setVisible] = React.useState(false); const [form] = Form.useForm(); const keys = Object.keys(defaultTheme); const onFinish = (nextToken: DesignToken) => { onChangeTheme(nextToken); }; return ( <>