1.1.4 • Published 3 years ago

react-simple-modal-gds v1.1.4

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

react-simple-modal-gds

forthebadge forthebadge forthebadge
Maintainability

Modal which is displayed after validation of a form. It includes opening, closing, and simple text parameters

Installation

  • using NPM
    $ npm install react-simple-modal-gds

Link to access the package here

Usage

Import Modal component in your React components:

import Modal from "react-simple-modal-gds";

Props

To use the component you need :

PropsTypeRequiredDefaultDescription
handleChangeObjectRequired-handleChange() is used to set a new state for the entry.
valueBoolRequiredFalseState allows you to display the modal
contentStringRequired-add text when the modal appears

Settings

import Modal from "react-simple-modal-gds";

export default function App() {
  const [open, setOpen] = useState(false);
  const openModal = () => {
    setOpen(!open);
  };
  return (
    <>
      <Modal content="Employee Created !" handleChange={setOpen} value={open} />
      <button onClick={openModal}>button</button>
    </>
  );
}

Auteur

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.0.11

3 years ago

1.1.0

3 years ago

0.1.0

3 years ago