Drawer
Basic Usage
Loading...
function Demo() {const [show, setShow] = useState(false)return (<><CButtonlabel="Click to open drawer"onClick={() => setShow(true)}/><CDrawershow={show}onShowChange={setShow}title="Hi, there">Hello, world.</CDrawer></>)}
Fold/Expand Code
Positions
Loading...
function Demo() {const { matArrowBack, matArrowUpward, matArrowForward, matArrowDownward } =MdIconsconst [show, setShow] = useState(false)const [position, setPosition] = useState('left')const openWithPosition = pos => {setPosition(pos)setShow(true)}return (<div><SpaceItems><CButtonicononClick={() => openWithPosition('left')}><CIcon content={matArrowBack} /></CButton><CButtonicononClick={() => openWithPosition('top')}><CIcon content={matArrowUpward} /></CButton><CButtonicononClick={() => openWithPosition('right')}><CIcon content={matArrowForward} /></CButton><CButtonicononClick={() => openWithPosition('bottom')}><CIcon content={matArrowDownward} /></CButton></SpaceItems><CDrawershow={show}onShowChange={setShow}title="Hi, there"position={position}>Hello, world</CDrawer></div>)}
Fold/Expand Code
Props
Name (*for required) | Description | Type | Default Value |
---|
No Data