Skip to content

GregDigital/react-simple-modal-gds-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 :

Props Type Required Default Description
handleChange Object Required - handleChange() is used to set a new state for the entry.
value Bool Required False State allows you to display the modal
content String Required - 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published