1.2.5 • Published 2 years ago

@desireeb/react-modal v1.2.5

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

React Modal

A simple a reusable modal component for React

Modal thumbnail

Installation

The package can be installed via npm: npm install @desireeb/react-modal

Or via yarn: yarn add @desireeb/react-modal

You’ll need to install React, React DOM and PropTypes separately since those dependencies aren’t included in the package. Below is a simple example of how to use the Modal in a React view.

import React, { useState } from "react";
import { Modal } from "@desireeb/react-modal";


const Example = () => {

    const [showModal, setShowModal] = useState(false)

    return (
        <Modal show={showModal} handleCloseBtn={() => setShowModal(false)}>
            {content}
        </Modal>
    )
})

Compatibility

React 18.2.0 and newer

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago