1.0.13 • Published 2 years ago

modal-module-thiw v1.0.13

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

Custom modal for Wealth Health company.

Installation

You can install modal-module-thiw with npm

npm i modal-module-thiw

Import

You need to import component and CSS

import Modal from "modal-module-thiw";
import "modal-module-thiw/dist-unminified/index.css";

<Modal />

Opening

The modal is invisible by default. To display the modal you must pass the value open to the argument setIsModalProp={'open'}

import Modal from "modal-module-thiw";
import "modal-module-thiw/dist-unminified/index.css";

function MyComponent() {
    return (
        <>
        <Modal setIsModalProp={'open'} isModal={'open'} />
        </>
    )
}

Closing

To hide the modal you must pass the value closed to the argument setIsModalProp={'closed'} or click on the 'close' button directly on the modal.

Options

To modify the content of modal you must use the argument content={}. To change the appearance of the modal you must pass an object to the argument modalStyle={}

example :

import Modal from "modal-module-thiw";
import "modal-module-thiw/dist-unminified/index.css";

function MyComponent() {
    return (
        <>
        <Modal content={myContent} modalStyle={{backgroundColor: "red", justifyContent: "left"}} />
        </>
    )
}

list of available style arguments :

backgroundColor,
fontSize,
justifyContent,
width,
height,
color,
boderStyle,
borderWidth,
borderColor,
borderRadius,

License

MIT ©

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago