import React from 'react'; import { Button, Flex, Splitter, Switch, Typography } from 'antd'; const Desc: React.FC> = (props) => ( {props.text} ); const App: React.FC = () => { const [sizes, setSizes] = React.useState<(number | string)[]>(['50%', '50%']); const [enabled, setEnabled] = React.useState(true); return ( setEnabled(!enabled)} checkedChildren="Enabled" unCheckedChildren="Disabled" /> ); }; export default App;