🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

dialog_popup

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dialog_popup

Création d'une librairie React (composant dialog)

latest
Source
npmnpm
Version
0.1.8
Version published
Weekly downloads
19
375%
Maintainers
1
Weekly downloads
 
Created
Source

P14 Plugin React Dialog

Création d'une librairie React (composant dialog)

Installation

Install dialog_popup with npm

  npm i dialog_popup

Usage/Examples

Importer le plugin :

import Modal from 'dialog_popup'

Creation du state dans le composant :

const [show, setShow] = useState(false);

Rendu :

<Modal title="My Modal" onValidate={() => setShow(false)} show={show}>
 This is the modal
</Modal>

Example d'usage :

import React, { useState } from "react";
import Modal from "dialog_popup";

export default function App() {
  const [show, setShow] = useState(false);


  return (
    <div className="App">
      <button onClick={() => setShow(true)}>Show Modal</button>
      <Modal title="My Modal" onValidate={() => setShow(false)} onCancel={cancelAction} show={show}>
        This is the modal
      </Modal>
    </div>
  );
}

Authors

  • @RemiPHILIPPOT

portfolio linkedin

Keywords

dialog

FAQs

Package last updated on 08 Jul 2022

Did you know?

Socket

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