import React, { useRef, useState } from 'react'; import type { InputRef } from 'antd'; import { Button, Input, Space, Switch } from 'antd'; const App: React.FC = () => { const inputRef = useRef(null); const [input, setInput] = useState(true); const sharedProps = { style: { width: '100%' }, defaultValue: 'Ant Design love you!', ref: inputRef, }; return ( { setInput(!input); }} />
{input ? : }
); }; export default App;