0.1.1 • Published 12 months ago

easy-modal-hook v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Easy-Modal-Hook

Introduction

Easy-Modal-Hook is a simple React Modal Hook that can be attached to any html element


Quick Start

Install from:

npm install easy-modal-hook

Usage example:

import { useModal } from 'easy-modal-hook'

function App(): JSX.Element {
  const { Modal, open } = useModal({
    // Specify any html element id to attach the modal
    root: 'any-id',
    // Specify a custom icon to the close button (Default: Close)
    closeIcon: <SvgClose />
  })

  return (
    <div>
      <button onClick={open}>Open</button>
      <Modal>
        <>Hello World!</>
      </Modal>
    </div>
  )
}

License

The MIT License.

0.1.0

12 months ago

0.1.1

12 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago