# simple-react-modal-by-assamoi

> Simple react modal

Latest version **0.1.5** (published 2022-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-react-modal-by-assamoi
pnpm add simple-react-modal-by-assamoi
yarn add simple-react-modal-by-assamoi
bun add simple-react-modal-by-assamoi
```

## 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.5 |
| Published | 2022-10-25 |
| First published | 2022-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anaïs Assamoi |
| Maintainers | anais05 |
| Keywords | react, modal |

## Links

- npm: https://www.npmjs.com/package/simple-react-modal-by-assamoi
- Repository: https://github.com/Anais05/my-react-modal
- Homepage: https://github.com/Anais05/my-react-modal#readme
- Issues: https://github.com/Anais05/my-react-modal/issues
- npm.io page: https://npm.io/package/simple-react-modal-by-assamoi

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2022-10-25
- 0.1.4 — 2022-09-30
- 0.1.3 — 2022-09-30
- 0.1.2 — 2022-09-29

## README

# A modal React component with customizable text content

## About

This is a simple modal component made as part of a react project
this modal is used to display a message when open
you can choose the message and the theme for the close button

## Installation

You can install this component with npm or yarn:

    npm i simple-react-modal-by-assamoi

or

    yarn add simple-react-modal-by-assamoi

## Example

```js
import React, { useState } from "react";
import { Modal } from "simple-react-modal-by-assamoi";

export default function App() {
  const [open, setOpen] = useState(false);

  // Choose modal text content
  const ModalContent = "You can write the content of your modal here !!";

  // Choose modal theme for close button
  const myTheme = {
    closeBtnColor: "#ffffff",
    closeBtnBgColor: "#008000",
  };

  return (
    <div>
      <button onClick={() => setOpen(true)} className="modal-btn">
        Open modal
      </button>
      <Modal
        open={open}
        content={ModalContent}
        theme={myTheme}
        onClose={() => setOpen(false)}
      />
    </div>
  );
}
```

## Demo

![](src/demo/modal-demo.gif)

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