bf-component-modal
v1.1.2
Published
Simple modal component for react project.
Readme
BF Component Modal
This module has been created for project 14 of DAJR OpenClassroom formation
Installation
npm install bf-component-modal --saveHow to use
import React, { useState } from 'react';
import { Modal } from 'bf-component-modal';
function myComponent() {
const [showModal, setShowModal] = useState(false);
return (
<Modal
title={"My modal header title"}
description={"My modal body content"}
show={showModal} // Boolean used to show or not the modal
onClose={(event) => setShowModal(false)} // Action when modal closing
/>
);
}
export default myComponent;
