# modalopix

> Modalopix ===========

Latest version **0.1.3** (published 2022-12-28) · 0 weekly downloads

## Install

```sh
npm install modalopix
pnpm add modalopix
yarn add modalopix
bun add modalopix
```

## 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.1.3 |
| Published | 2022-12-28 |
| First published | 2022-12-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | 0pix |

## Links

- npm: https://www.npmjs.com/package/modalopix
- npm.io page: https://npm.io/package/modalopix

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## Recent versions

- 0.1.3 (latest) — 2022-12-28
- 0.1.2 — 2022-12-13
- 0.1.1 — 2022-12-13
- 0.1.0 — 2022-12-13
- 0.1.9 — 2022-12-12

## README

Modalopix
===========

A modal component for React applications.

Installation
------------

You need node.js and npm. You should probably install this globally.
To install the modal component, run the following command:

**Npm way**

    npm i modalopix

Usage
-----------------------

To use the Modal component, import it into your React component and import useState:

```javascript
import {useState} from "react";
import Modal from 'modal-component';
```

Then, you can use the Modal component in your JSX like this:

```javascript
const [openModal, setOpenModal] = useState(true);

const fonctionClosebtn = () => {
	setOpenModal(false)
}

<Modal openModal={openModal} setOpenModal={setOpenModal} functionCloseBtn={functionCloseBtn}>
	{/* Modal content goes here */}
</Modal>

```

Props
------------

The modal component takes the following props:

-openModal (boolean): whether the modal is open or closed

-setOpenModal (function): a function to set the value of openModal

-functionCloseBtn (function): a function to be called when the close button is clicked



Styling
------------

The modal component comes with a default set of styles, which can be overridden by creating a modal.css file in your
project and including your own styles.


Customization
------------

The modal component can be customized by passing in your own content as children. The close button can also be
customized by replacing the cross.svg file with your own image.

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