0.1.7 • Published 1 year ago

hrnet-modal-library v0.1.7

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

HRnet Modal Library

Installation :

  • To install, you can use npm or yarn: npm install hrnet-modal-library or yarn add hrnet-modal-library

Usage

import { useState } from 'react'
import { Modal } from 'hrnet-modal-library'

export const Example = () => {
  const [isOpen, setIsOpen] = useState(false)
  const openModal = () => {
    setIsOpen(true)
  }
  return (
    <>
      <button onClick={openModal}>Open Modal</button>
      <Modal isOpen={isOpen} onClose={() => setIsOpen(false)}>
        Lorem ipsum...
      </Modal>
    </>
  )
}
  • isOpen : boolean | Contains the state (opened(true) or closed(false))
  • onClose : function | Calls the function which close the modal
0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago