# use-modal-kit

> useModalKit

Latest version **1.0.7** (published 2021-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-modal-kit
pnpm add use-modal-kit
yarn add use-modal-kit
bun add use-modal-kit
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-11-11 |
| First published | 2021-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 5.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Snikerso |
| Maintainers | snikers |

## Links

- npm: https://www.npmjs.com/package/use-modal-kit
- Repository: https://github.com/Snikerso/use-modal-kit
- Homepage: https://github.com/Snikerso/use-modal-kit#readme
- Issues: https://github.com/Snikerso/use-modal-kit/issues
- npm.io page: https://npm.io/package/use-modal-kit

## Recent versions

- 1.0.7 (latest) — 2021-11-11
- 1.0.6 — 2021-09-30
- 1.0.5 — 2021-09-30
- 1.0.4 — 2021-09-30
- 1.0.3 — 2021-09-30
- 1.0.2 — 2021-09-30
- 1.0.1 — 2021-09-30
- 1.0.0 — 2021-09-30

## README

# use-modal-kit

> useModalKit

[![NPM](https://img.shields.io/npm/v/use-modal-kit.svg)](https://www.npmjs.com/package/use-modal-kit) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save use-modal-kit
```
#### If you want to create your own react npm-package, I recommend https://dev.to/ramonak/how-to-publish-a-custom-react-component-to-npm-using-create-react-library-4bhi

## Usage


### If you want to create own modal with an initialize button

```tsx
import React, { Component } from 'react'

import {useModalKit} from 'use-modal-kit'

export const CustomModal = () => {
  const { setIsOpen, Modal } = useModal()
  return (
    <>
      <button onClick={()=>setIsOpen(true)}>Open</button>
      <Modal Main={<div><button onClick={()=>setIsOpen(false)}>X</button></div> } Overlay={<div></div>}/>
    </>
  )
}
```

## License

MIT © [Snikerso](https://github.com/Snikerso)

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