dahlia-drawer
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

dahlia-drawer

Installation

yarn add dahlia-drawer

Quick Start

import React from 'react'
import { Drawers, DrawerConfig, drawerStore } from 'dahlia-drawer'

const About = () => (
  <span>
    about
    <button onClick={() => drawerStore.close('about')}>close</button>
  </span>
)

About.drawerProps = {
  title: 'about me',
  width: '80%',
}

const config: DrawerConfig = [
  {
    name: 'about',
    component: About,
  },
]

export default () => (
  <div>
    <Drawers config={config} />
    <span>Hi, Dahlia</span>
    <button onClick={() => drawerStore.open('about')}>open</button>
  </div>
)

License

MIT License

Dependents (2)

Package Sidebar

Install

npm i dahlia-drawer

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

11.4 kB

Total Files

12

Last publish

Collaborators

  • forsigner