projet-14-library

1.0.6 • Public • Published

projet-14-library

modal projet 14

NPM JavaScript Style Guide

library crated for the project 14 of OpenClassroom

Install

npm install --save projet-14-library

Usage

Put the element you want inside of the Modal element, your element behaves like a normal div, which you can entirely customize via css live your own divs. Only things added will be the cross permiting to exit the modal and the dark background. The open function will open the modal for you.

Exemple:

import modal from 'projet-14-library'
import 'projet-14-library/dist/index.css';

var {Modal, open} = modal

function Yourfunction() {
    return (
        <Modal><div id="Yourelement">content</div></Modal>
        <button onClick={open}></button>
    )
}

Exemple of the modal in action:

Modal

License

MIT © LascanTeki

Readme

Keywords

Package Sidebar

Install

npm i projet-14-library

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

7.88 kB

Total Files

7

Last publish

Collaborators

  • lascan