# react-ys-popup

> Test;;for easy popup component creation and free design

Latest version **0.0.1-release** (published 2021-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-ys-popup
pnpm add react-ys-popup
yarn add react-ys-popup
bun add react-ys-popup
```

## 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.0.1-release |
| Published | 2021-01-13 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yunsang Jeong |
| Maintainers | yunsang |
| Keywords | react, component, popup |

## Links

- npm: https://www.npmjs.com/package/react-ys-popup
- Repository: https://github.com/JeongYS/YsPopup
- Homepage: https://github.com/JeongYS/YsPopup#readme
- Issues: https://github.com/JeongYS/YsPopup/issues
- npm.io page: https://npm.io/package/react-ys-popup

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^17.0.1
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.1
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^5.7.3

## 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.0.1-release (latest) — 2021-01-13
- 0.0.1-alpha — 2021-01-13

## README

# react-ys-popup

This module allows you to easily create and customize pop-ups. 

- Create centered pop-up
- Free Popup Size Setting (wdith, height)
- Easy background click and esc click function setting

## Installation

Please install using npm :

    npm install react-ys-popup
    or
    yarn add react-ys-popup

## Setting

Use the following Prop.

- isOn: Pop-up activation;
- width: Pop-up width size
- height: Pop-up height size
- className (Optional) : Pop-up class name
- onClickBackground (Optional) : setting background and 'esc' click handler;
- backgroundAlpha (Optional) : background color alhpa
- left (Optional) : left margin if you don't want center alignment
- top (Optional): top margin if you don't want center alignment

## Example Code

### Basic example
    <Popup isOn={isPupupOn} width={128} height={128}>
        <div style={{ width: "100%", height: "100%", backgroundColor: "grey" }}> {Contents} </div>
    </Popup>

### Background Click example
    const [isPupupOn, onPopup] = useState(false) 

    return(
        <Popup isOn={isPupupOn} width={128} height={128} onClickBackground={()=>{onPopup(false)}}>
            <div style={{ width: "100%", height: "100%", backgroundColor: "grey" }}> {Contents} </div>
        </Popup>
    )

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