import React from 'react'; import { Button, Flex, Radio, Slider } from 'antd'; import type { ConfigProviderProps } from 'antd'; type SizeType = ConfigProviderProps['componentSize']; 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;