import React from 'react'; import { Button, Flex, Radio, Slider } from 'antd'; import type { SizeType } from 'antd/es/config-provider/SizeContext'; const App: React.FC = () => { const [gapSize, setGapSize] = React.useState('small'); const [customGapSize, setCustomGapSize] = React.useState(0); return ( setGapSize(e.target.value)}> {['small', 'middle', 'large', 'customize'].map((size) => ( {size} ))} {gapSize === 'customize' && } ); }; export default App;