npm.io
1.1.2 • Published 3 years ago

bf-component-modal

Licence
MIT
Version
1.1.2
Deps
2
Size
10 kB
Vulns
0
Weekly
0

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;

Keywords