0.3.0 • Published 6 months ago

project-14-hrnet-modale v0.3.0

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Project-14-hrnet-package

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start when in \project-14-hrnet-modale

How to install package

npm install project-14-hrnet-modale in your project

How to use package

import import { Modale } from "project-14-hrnet-modale";

Import react component in desired file then

how to use it

You can display modale by setting a usestate to false and then call the modal with it like so : \

import { Modale } from "project-14-hrnet-modale";
import { useEffect, useState } from "react";

export default function App() {

    const [displayModale, setDisplayModale] = useState(false);
    useEffect(() => {
       setDisplayModale(true)
    },[])

  return (
    <div>
        {displayModale && <Modale setDisplayModale={setDisplayModale}/>}
    </div>
  );
}

options

There is some options you can had to customise your utilisation, you have to add it in Modale props like so :\

const options = {   
    escapeClose: true,   //add ability to close modal with escape
    clickClose: true,   //add ability to click at grey background to close modal
    closeText: 'Employee Created',   //custom content text to display in modal
    showClose: true, //add ability to close modal with an X cross on top right corner
    modalClass: "modale", //select modal name to custom css
    blockerClass: "modale-opacity", //select modal background name to custom css
  }

<Modale setDisplayModale={setDisplayModale} options={options}/>
0.3.0

6 months ago

0.2.5

6 months ago

0.2.4

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.9

6 months ago

0.1.8

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago