1.0.7 • Published 2 years ago

use-modal-kit v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

use-modal-kit

useModalKit

NPM JavaScript Style Guide

Install

npm install --save use-modal-kit

If you want to create your own react npm-package, I recommend https://dev.to/ramonak/how-to-publish-a-custom-react-component-to-npm-using-create-react-library-4bhi

Usage

If you want to create own modal with an initialize button

import React, { Component } from 'react'

import {useModalKit} from 'use-modal-kit'

export const CustomModal = () => {
  const { setIsOpen, Modal } = useModal()
  return (
    <>
      <button onClick={()=>setIsOpen(true)}>Open</button>
      <Modal Main={<div><button onClick={()=>setIsOpen(false)}>X</button></div> } Overlay={<div></div>}/>
    </>
  )
}

License

MIT © Snikerso

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago