Skip to content

h-khribich/Khribich_Hamza_14_bibliotheque_react_032022-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modal-component-oc-hk-1

This component must work with a react project such as Create React App.

Installation

In the project directory, you can run:

npm i modal-component-oc-hk-1

or

yarn add modal-component-oc-hk-1

Usage

  1. First import the Modal

import { Modal } from "modal-component-oc-hk-1/dist/index"

  1. In the same file, add then the function that toggles the modal

import { toggleModal } from 'modal-component-oc-hk-1/dist/components/Modal'

  1. Add the modal component where desired and use the message prop to change the modal message if you so wish

For example :

export default function AppTest () {
    return (
        <Modal
            message={'Hello!'}
        >
    )
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published