1.0.1 • Published 2 years ago

modal-component-oc-hk-1 v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

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!'}
        >
    )
}