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