Drawer

Drawer

Import

import { Drawer } from '@unllamas/lacrypta-ui';

Usage


import { useDisclosure, Drawer, Button } from '@unllamas/lacrypta-ui';
 
export const Preview = () => {
  const { isOpen, onOpen, onClose } = useDisclosure();
 
  return (
    <>
      <Button onClick={onOpen}>Open Drawer</Button>
      <Drawer isOpen={isOpen} onClose={onClose}>
        ...
      </Drawer>
    </>
  );
}

Custom title


Testeando el titulo
  <Drawer ... title={'Testeando el titulo'}>
    ...
  </Drawer>

Custom close button


import { Cancel } from '@unllamas/lacrypta-ui'
 
<Drawer ... closeText={<Cancel />}>
  ...
</Drawer>