1.0.8 • Published 1 year ago

react-modal-simple-customizable v1.0.8

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

react-modal-simple-customizable

NPM version Build npm-typescriptLicense]github-license-url

It is simple React modal dialog which can be fully and easily customized

Live Demo

Installation:

npm install react-modal-simple-customizable

or

yarn add react-modal-simple-customizable

or

pnpm add react-modal-simple-customizable

Usage :

Add Modal to your component:

import React, { useState } from 'react'
import { Modal } from 'react-modal-simple-customizable'

const App = () => {
  const [showModal, setShowModal] = useState(false)

  const onCloseHandler = () => setShowModal(false)

  return (
    <div className='App'>
      <button type='button' onClick={() => setShowModal(true)}>
        Show Modal
      </button>
      <Modal onClose={onCloseHandler} show={showModal}>
        <h1>Modal title</h1>
        <p>modal paragraph</p>
        <button type='button' onClick={onCloseHandler}>
          Close
        </button>
      </Modal>
    </div>
  )
}
1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago