modal-save-employee-p14

1.0.4 • Public • Published

modal-save-employee-p14

React modal message validation save employee

NPM JavaScript Style Guide

Install

npm install --save modal-save-employee-p14

Table of props

Unit Example
Content String "Employee Crée"
Toggle Boolean false or true
action function function openModal() { setmodalState(!toggle) }

Usage

import './App.css';
import React from 'react';
import Modal from 'modal-save-employee-p14';

export function App() {
  const [modalState, setmodalState] = React.useState(false)
  const [content, setContent] = React.useState("");
  function openModal(){
    setmodalState(!modalState)
}
function saveData(){
      setContent("Employee Crée")
      openModal()
}
  return (
    <div className="App">
      <header className="App-header">
      <Modal content={content} toggle={modalState} action={openModal}/>
      <button variant="outlined" onClick={saveData}>AfficheModal</button>
      </header>
    </div>
  );
}

export default App; 

License

MIT © qgrems

Readme

Keywords

Package Sidebar

Install

npm i modal-save-employee-p14

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

8.32 kB

Total Files

7

Last publish

Collaborators

  • qgrems