0.6.0 • Published 3 years ago

@peajs/modal v0.6.0

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

@peajs/modal

Installation

npm i @peajs/modal

Quick Start

import React from 'react'
import { Modals, ModalConfig, modalStore } from '@peajs/modal'

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

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

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

License

MIT License

0.6.0

3 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago