# react-simple-tips

> Create a simple react prompt component.

Latest version **0.1.6** (published 2019-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-simple-tips
pnpm add react-simple-tips
yarn add react-simple-tips
bun add react-simple-tips
```

## 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.6 |
| Published | 2019-07-26 |
| First published | 2019-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | majiang |
| Maintainers | cssking |
| Keywords | react, tips, prompt |

## Links

- npm: https://www.npmjs.com/package/react-simple-tips
- Repository: https://github.com/majiang666/react-simple-tips
- Homepage: https://github.com/majiang666/react-simple-tips#readme
- Issues: https://github.com/majiang666/react-simple-tips/issues
- npm.io page: https://npm.io/package/react-simple-tips

## Dependencies (2)

- [cross-env](https://npm.io/package/cross-env.md) ^5.2.0
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.5.5

## 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.6 (latest) — 2019-07-26
- 0.1.5 — 2019-07-17
- 0.1.4 — 2019-07-14
- 0.1.3 — 2019-07-14
- 0.1.2 — 2019-07-13
- 0.1.0 — 2019-07-13

## README

# react-simple-tips
Create a simple react prompt component.

## Usage
1:安装
```
npm install react-simple-tips --save
or
yarn add react-simple-tips
```
2:引入
```
import { Tips } from 'react-simple-tips'
```
3:使用
```
<Tips />  

funs = () => {
    this.setState({
        flag:true
    });
    setTimeout(() => {
        this.setState({
        flag:false
        });
    }, 2000);
}
```

## API
```
<Tips 
    showFlag = { showFlag }
    location = { location }
    distance = { distance }
    tipsMsg = { tipsMsg }
/>
```
**showFlag**

是否显示 true/false(默认) [Boolean]

**location**

提示框位置 top/center/bottom(默认) [String]

**distance**

提示显示位置，只有 location 为 top/bottom(默认50px) 生效 [String]

**tipsMsg**

提示内容 提示(默认) [String]

**times**(已废除)

消失时间 2000(默认,毫秒) [Number]  

## 更新记录  

===== 2019-07-26 ======   
1：修复提示不居中问题  
2：缩小提示框上下间距  
3：降低提示框透明度为0.5  
4：缩小提示框文字为13px  

===== 2019-07-17 ======  
1：紧急废除times配置项，时间配置留给用户自己配置  
2：新增提示框消失动画

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