Documents / @faasjs/ant-design / useDrawer
Function: useDrawer()
useDrawer(
init
?):object
Hook style drawer
function Example() {
const { drawer, setDrawerProps } = useDrawer()
return <>
<Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }>
Toggle
</Button>
{drawer}
</>
}
Parameters
• init?: DrawerProps
Returns
object
drawer
drawer:
Element
drawerProps
drawerProps:
DrawerProps
=props
setDrawerProps
setDrawerProps:
setDrawerProps