function Example() {
const [show, setShow] = React.useState(false);
return (
<>
<Button onClick={() => setShow(true)}>Toggle</Button>
<FormDrawer
drawerProps={{ show, onHide: () => setShow(false) }}
formProps={{
onSubmit: (values) => {
console.log(values);
setShow(false);
},
}}
renderContent={() => (
<>
<FormField>
<TextField name="test" label="Text Field" />
</FormField>
</>
)}
/>
</>
);
}