react-interaction
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

react-interaction

Collection of components for interaction

NPM JavaScript Style Guide

📢️ Please check it. Currently, this module supports React 16.8 and later.

Components

  • Toast popup
  • Notice
  • Check
  • Tooltip

Demo

Example

Install

npm install --save react-interaction

Usage

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.748latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.748
1.1.62
1.1.52
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.1.20
0.1.10
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i react-interaction

Weekly Downloads

52

Version

1.1.7

License

MIT

Unpacked Size

656 kB

Total Files

35

Last publish

Collaborators

  • almondbongbong