# simple-dawn-modal

> Simple modal component and functions to display messages

Latest version **0.2.0** (published 2023-06-23) · 0 weekly downloads

## Install

```sh
npm install simple-dawn-modal
pnpm add simple-dawn-modal
yarn add simple-dawn-modal
bun add simple-dawn-modal
```

## 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.0 |
| Published | 2023-06-23 |
| First published | 2023-06-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cedawn |
| Maintainers | cedawn |
| Keywords | react, modal, react-component, popup |

## Links

- npm: https://www.npmjs.com/package/simple-dawn-modal
- Repository: https://github.com/CedDawn/simple-dawn-modal
- Homepage: https://github.com/CedDawn/simple-dawn-modal#readme
- Issues: https://github.com/CedDawn/simple-dawn-modal/issues
- npm.io page: https://npm.io/package/simple-dawn-modal

## Dependencies (4)

- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [@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

## 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.2.0 (latest) — 2023-06-23
- 0.1.6 — 2023-06-23
- 0.1.5 — 2023-06-21
- 0.1.4 — 2023-06-21
- 0.1.3 — 2023-06-19
- 0.1.2 — 2023-06-19
- 0.1.1 — 2023-06-19
- 0.1.0 — 2023-06-19

## README

# simple-dawn-modal

A library of React components created using `create-react-app`.

## Installation

Run the following command:

```
npm install simple-dawn-modal
```

## Recommended tools

- Integrated Development Environment (IDE): [Visual Studio Code](https://code.visualstudio.com)
- [NodeJS (version 18.6.0)](https://nodejs.org/en)
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)

## How to use

First you'll need to import the Modal and its open function with the line:

```js
import { Modal, handleOpen } from 'simple-dawn-modal'
```

(You can also use the `handleClose` function if you want to make the close button yourself)

Then you can simply use them as this way:

```html
<button onClick="{handleOpen}">Show me my Modal</button>
<Modal content="Exemple of what you could write in there." />
```

You can use these parameters to modify the bearing of the Modal:
| Parameters | Description | Format | Default Value | Required |
| --------------- | ---------------------------------------------------- | ------- | ------------- | -------- |
| content | The content of the Modal | string | none | true |
| open | If the Modal is already open when the page is loaded | boolean | false | false |
| disableCloseBtn | Remove the close button | boolean | false | false |
| disableCloseBkg | Click outside the Modal won't close it anymore | boolean | false | false |
| disableCloseEscape | Press Escape won't close the Modal anymore | boolean | false | false |

## Exemples

[Simple Modal](https://codesandbox.io/p/sandbox/simple-dawn-modal-yqxn75)

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