@fishx/drawer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@fishx/drawer

Installation

yarn add @fishx/drawer

Quick Start

import React from 'react'
import { Drawers, DrawerConfig, drawerStore } from '@fishx/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>
)

Readme

Keywords

none

Package Sidebar

Install

npm i @fishx/drawer

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.84 kB

Total Files

11

Last publish

Collaborators

  • whalecloud-developer