Socket
Socket
Sign inDemoInstall

modal-sp

Package Overview
Dependencies
9
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    modal-sp

Plugin Modal Personnal


Version published
Maintainers
1
Created

Readme

Source

Plugin Modal with Create React App and npm

NPM Version NPM Downloads

GitHub Last Commit

Description

modal-sp est un composant qui permet d'afficher une modal de validation en fonction de critères définis dans le projet initial.

Sommaire


Prerequis

Veuillez vous assurer d'avoir les versions suivantes :

  • Node.js (version 18) : commande "node --version"
  • REACT (version 18) REACT DOM (version 18)

Installation

Tapez la commande suivante dans votre projet pour installer le composant modal-sp :

NPM : npm i modal-sp
ou Yarn : yarn add modal-sp


Paramètres

  • message : Permet de personnaliser le message affiché de la modal
  • parameter : Permet de personnaliser le style CSS de la modal
  • modal : Permet de déterminer la valeur de la modal (ouverte ou fermée)
  • setModal : Permet de déterminer l'état

Utilisation


import React, { useState } from "react";
import Modal from "modal-sp";

export default function Modal() {
const [modal, setModal] = useState(false);
const handleSubmit = (e) => {
setModal(!modal);
};
return (
<form action="#" id="form" onSubmit={handleSubmit}>
</form>
<Modal
      message="Employee Created !"
      parameter={modalParameter}
      modal={modal}
      setModal={setModal}
    />
);
}



Keywords

FAQs

Last updated on 30 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc