# simple-modal-component-ab

> A simple & lightweight method of displaying modal windows.

Latest version **0.2.8** (published 2022-05-25) · 0 weekly downloads

## Install

```sh
npm install simple-modal-component-ab
pnpm add simple-modal-component-ab
yarn add simple-modal-component-ab
bun add simple-modal-component-ab
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.8 |
| Published | 2022-05-25 |
| First published | 2022-05-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | audreybelhoste |

## Links

- npm: https://www.npmjs.com/package/simple-modal-component-ab
- npm.io page: https://npm.io/package/simple-modal-component-ab

## Dependencies (7)

- [react-dom](https://npm.io/package/react-dom.md) ^17.0.0
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.17.10
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.17.10
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.17.10
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.16.7

## Recent versions

- 0.2.8 (latest) — 2022-05-25
- 0.2.7 — 2022-05-20
- 0.2.6 — 2022-05-20
- 0.2.5 — 2022-05-20
- 0.2.4 — 2022-05-20
- 0.2.3 — 2022-05-20
- 0.2.2 — 2022-05-19
- 0.2.1 — 2022-05-13
- 0.2.0 — 2022-05-13
- 0.1.4 — 2022-05-13
- 0.1.3 — 2022-05-13
- 0.1.2 — 2022-05-12
- 0.1.1 — 2022-05-12
- 0.1.0 — 2022-05-07

## README

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

```jsx
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.

---
_Source: https://npm.io/package/simple-modal-component-ab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
