1.1.2 • Published 2 years ago
bf-component-modal v1.1.2
BF Component Modal
This module has been created for project 14 of DAJR OpenClassroom formation
Installation
npm install bf-component-modal --save
How 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;