import React, { useState } from 'react'; import { ClockCircleOutlined, DownOutlined, MailOutlined, SettingOutlined, } from '@ant-design/icons'; import type { SpaceProps, TreeSelectProps } from 'antd'; import { Alert, Button, Card, Checkbox, Col, ConfigProvider, DatePicker, Divider, Dropdown, Form, Input, InputNumber, Mentions, Menu, Pagination, Progress, Radio, Row, Select, Slider, Space, Spin, Steps, Switch, Table, Tabs, Tag, Timeline, TimePicker, Transfer, Tree, TreeSelect, Typography, } from 'antd'; import { SketchPicker } from 'react-color'; const SplitSpace: React.FC = props => ( } size={4} {...props} /> ); const menuItems = [ { key: 'mail', icon: , label: 'Mail', }, { key: 'SubMenu', icon: , label: 'Submenu', children: [ { type: 'group', label: 'Item 1', children: [ { key: 'setting:1', label: 'Option 1', }, { key: 'setting:2', label: 'Option 2', }, ], }, ], }, ]; const inputProps = { style: { width: 128 }, }; const selectProps = { ...inputProps, options: [ { value: 'light', label: 'Light' }, { value: 'bamboo', label: 'Bamboo' }, { value: 'little', label: 'Little' }, ], }; const treeData = [ { value: 'little', key: 'little', label: 'Little', title: 'Little', children: [ { value: 'light', key: 'light', label: 'Light', title: 'Light' }, { value: 'bamboo', key: 'bamboo', label: 'Bamboo', title: 'Bamboo' }, ], }, ]; const treeSelectProps: TreeSelectProps = { ...inputProps, treeCheckable: true, maxTagCount: 'responsive', treeData, }; const carTabListNoTitle = [ { key: 'article', tab: 'article', }, { key: 'app', tab: 'app', }, { key: 'project', tab: 'project', }, ]; const MyTransfer = () => { const mockData = []; for (let i = 0; i < 20; i++) { mockData.push({ key: i.toString(), title: `content${i + 1}`, description: `description of content${i + 1}`, }); } return ( item.title} /> ); }; const App: React.FC = () => { const [color, setColor] = useState({ primaryColor: '#1890ff', errorColor: '#ff4d4f', warningColor: '#faad14', successColor: '#52c41a', infoColor: '#1890ff', }); const onColorChange = (nextColor: Partial) => { const mergedNextColor = { ...color, ...nextColor, }; setColor(mergedNextColor); ConfigProvider.config({ theme: mergedNextColor, }); }; return ( {/* Primary Color */} { onColorChange({ primaryColor: hex, }); }} /> var(`--ant-primary-color`) {/* Error Color */} { onColorChange({ errorColor: hex, }); }} /> var(`--ant-error-color`) {/* Warning Color */} { onColorChange({ warningColor: hex, }); }} /> var(`--ant-warning-color`) {/* Success Color */} { onColorChange({ successColor: hex, }); }} /> var(`--ant-success-color`) {/* Info Color */} { onColorChange({ infoColor: hex, }); }} /> var(`--ant-info-color`) } style={{ width: '100%' }} size={0}> {/* Primary Button */} {/* Danger Button */} {/* Ghost Button */} {/* Typography */} Text (success) Text(warning) Text(danger) Link Text {/* Dropdown */} e.preventDefault()}> Hover me {/* Spin */} {/* Menu - horizontal */} {/* Menu - vertical */} {/* Pagination */} {/* Steps */} {/* Steps - dot */} {/* Form - Input */}
{/* Form - Select */}