1.1.7 • Published 4 years ago
react-interaction v1.1.7
react-interaction
Collection of components for interaction
📢️ Please check it. Currently, this module supports React 16.8 and later.
Components
- Toast popup
- Notice
- Check
- Tooltip
Demo
Install
npm install --save react-interactionUsage
import { toast, notice, check, Tooltip } from 'react-interaction';Toast
toast(message, options)options
| Name | Type | Default | Description |
|---|---|---|---|
| time | number | 3000 | The millisecond time that the message is displayed. |
| className | string | ||
| style | CSSProperties |
Notice
Promise based notice component such as alert
notice(message, options).then(() => console.log('closed'));options
| Name | Type | Default | Description |
|---|---|---|---|
| dimmedClassName | string | ||
| dimmedStyle | CSSProperties | ||
| contentClassName | string | ||
| contentStyle | CSSProperties | ||
| messageClassName | string | ||
| messageStyle | CSSProperties | ||
| okClassName | string | ||
| okStyle | CSSProperties | ||
| okText | string | 'OK' |
Check
Promise based check component such as confirm
check(message, options).then(isConfirmed => console.log(isConfirmed));options
| Name | Type | Default | Description |
|---|---|---|---|
| dimmedClassName | string | ||
| dimmedStyle | CSSProperties | ||
| contentClassName | string | ||
| contentStyle | CSSProperties | ||
| messageClassName | string | ||
| messageStyle | CSSProperties | ||
| okClassName | string | ||
| okStyle | CSSProperties | ||
| okText | string | 'OK' | |
| cancelClassName | string | ||
| cancelStyle | CSSProperties | ||
| cancelText | string | 'Cancel' |
Tooltip
The position of the tooltip is calculated automatically.
<Tooltip message="Tooltip message">tooltip</Tooltip>props
| Name | Type | Default | Description |
|---|---|---|---|
| style | CSSProperties | ||
| className | string | ||
| message | ReactNode | ||
| messageStyle | CSSProperties | ||
| messageClassName | string | ||
| toggle | boolean | false |
License
MIT © almond-bongbong
1.1.7
4 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago