0.2.8 • Published 2 years ago

simple-modal-component-ab v0.2.8

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

A simple & lightweight method of displaying modal windows.

Installation

To install, you can use npm or yarn:

$ npm install simple-modal-component
$ yarn add simple-modal-component

Usage

import { useState } from "react";
import Modal from "@simple-modal-component-ab/Modal";

export const Exemple = () => {
	const [isOpened, setIsOpened] = useState(false);

	return(	
		<Modal
			isOpened={isOpened}
			onClose={() => setIsOpened(false)}
		>
			<p>Your text here</p>
		</Modal>
	)
}
  • isOpened : boolean | Contains the state (opened or closed) of the modale
  • onClose : function | Calls the function which closes the modale

You can use CSS class .modal-content to customize style, for example : background-color, border, border-radius, max-width, padding.

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago