1.1.0 • Published 6 years ago

dahlia-drawer v1.1.0

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

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

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago