0.18.0 • Published 3 years ago

@another-ui/drawer v0.18.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@another-ui/drawer

Just another drawer component for React

Usage

import React from 'react';
import { Drawer, DrawerProvider, useDrawer } from '@another-ui/drawer';
import '@another-ui/drawer/dist/drawer.css';

const DemoDrawer = () => {
  const { close } = useDrawer();
  return (
    <Drawer className="custom-class" direction="left" padding theme="dark">
      Demo
      <button onClick={() => close()} type="button">Close</button>
    </Drawer>
  );
};

const OpenDrawerButton = () => {
  const { open } = useDrawer();
  return <button onClick={() => open('DemoDrawer')} type="button">Open</button>;
};

export const Example = () => (
  <DrawerProvider components={{ DemoDrawer }}>
    <OpenDrawerButton />
  </DrawerProvider>
);
0.18.0

3 years ago

0.17.1

3 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.15.0

3 years ago

0.13.0

3 years ago

0.14.0

3 years ago

0.12.0

3 years ago

0.11.2

3 years ago

0.11.0

3 years ago