import React, { useState } from 'react'; import { Button, Radio, Slider, Space } from 'antd'; import type { ConfigProviderProps } from 'antd'; type SizeType = ConfigProviderProps['componentSize']; const App: React.FC = () => { const [size, setSize] = useState('small'); const [customSize, setCustomSize] = React.useState(0); return ( <> setSize(e.target.value)}> {['small', 'middle', 'large', 'customize'].map((item) => ( {item} ))}

{size === 'customize' && ( <>
)} ); }; export default App;