projectop-modal-customize-react
v0.1.12
Published
modal open and close for op14
Downloads
8
Readme
Modal
Simple et flexible, le plugin modal pour React permet d'intégrer facilement des modales de confirmation personnalisées dans vos applications.
Installation
Installez le plugin Modal via npm :
npm install --save projectop-modal-customize-react
Utilisez la modal :
import React, { useState } from "react";
import Modal from "projectop-modal-customize-react";
const MonComposant = () => {
const [modalOpen, setModalOpen] = useState(false);
// ... Gérez les fonctions de gestion de la modal (handleOpenModal, etc.)
return (
<div>
<button onClick={handleOpenModal}>Ouvrir la Modal</button>
{modalOpen && (
<Modal
isOpen={modalOpen}
onClose={handleCloseModal}
modalTitle="Titre de la Modal"
showButtons={true}
>
{/* Contenu additionnel de la modal */}
</Modal>
)}
</div>
);
};
export default MonComposant;
Modal Externe Personnalisable - Documentation
La modal externe personnalisable vous permet d'ajuster son apparence et son comportement en fonction de différentes options. Voici un aperçu des possibilités et du code pour chaque option :
Options et Utilisation
Props
Le composant Modal accepte les props suivantes :
isOpen
onClose
modalTitle
firstName
lastName
showButtons
actionLabel