import React, { useState } from 'react'; import type { DescriptionsProps, RadioChangeEvent } from 'antd'; import { Button, ConfigProvider, Descriptions, Radio } from 'antd'; const borderedItems: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2', label: 'Billing', children: 'Prepaid', }, { key: '3', label: 'Time', children: '18:00:00', }, { key: '4', label: 'Amount', children: '$80.00', }, { key: '5', label: 'Discount', children: '$20.00', }, { key: '6', label: 'Official', children: '$60.00', }, { key: '7', label: 'Config Info', children: ( <> Data disk type: MongoDB Database version: 3.4 Package: dds.mongo.mid Storage space: 10 GB Replication factor: 3 Region: East China 1 > ), }, ]; const items: DescriptionsProps['items'] = [ { key: '1', label: 'Product', children: 'Cloud Database', }, { key: '2', label: 'Billing', children: 'Prepaid', }, { key: '3', label: 'Time', children: '18:00:00', }, { key: '4', label: 'Amount', children: '$80.00', }, { key: '5', label: 'Discount', children: '$20.00', }, { key: '6', label: 'Official', children: '$60.00', }, ]; const App: React.FC = () => { const [size, setSize] = useState<'default' | 'middle' | 'small'>('default'); const onChange = (e: RadioChangeEvent) => { console.log('size checked', e.target.value); setSize(e.target.value); }; return ( default middle small extra color: blue} items={borderedItems} /> Edit} items={items} /> ); }; export default App;