@gemcook/modal

---

Stats

StarsIssuesVersionUpdatedCreatedSize
@gemcook/modal
193.5.32 years ago3 years agoMinified + gzip package size for @gemcook/modal in KB

Readme

@gemcook/modal


npm version

React Modal Component.

Online Demo

Installation

npm install --save @gemcook/modal

or

yarn add @gemcook/modal

Usage

SCSS

Import @gemcook/modal/lib/styles/index.scss to your SCSS.

@import "~@gemcook/modal/lib/styles/index";

Examples

default

<div>
  <Button
    color="pink"
    onClick={() => store.set({ isModal: !store.state.isModal })}
  >
    Open Modal
  </Button>
  <Modal
    isModal={store.state.isModal}
    ModalBody={Welcome}
    handleCloseModal={() => store.set({ isModal: !store.state.isModal })}
  />
</div>

Documentaion

Props

Parameter Type Required Default Description
isModal boolean true undefined -
ModalBody React.Element true undefined -
handleCloseModal (isModal: boolean) => void true undefined -
size enum false 'sm' Enums: 'xs', 'sm', 'md', 'lg', 'xl', 'full'

License

@gemcook/modal is released under the MIT license.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.