1.1.7 • Published 3 years ago

react-interaction v1.1.7

Weekly downloads
32
License
MIT
Repository
github
Last release
3 years ago

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

NameTypeDefaultDescription
timenumber3000The millisecond time that the message is displayed.
classNamestring
styleCSSProperties

Notice

Promise based notice component such as alert

notice(message, options).then(() => console.log('closed'));

options

NameTypeDefaultDescription
dimmedClassNamestring
dimmedStyleCSSProperties
contentClassNamestring
contentStyleCSSProperties
messageClassNamestring
messageStyleCSSProperties
okClassNamestring
okStyleCSSProperties
okTextstring'OK'

Check

Promise based check component such as confirm

check(message, options).then(isConfirmed => console.log(isConfirmed));

options

NameTypeDefaultDescription
dimmedClassNamestring
dimmedStyleCSSProperties
contentClassNamestring
contentStyleCSSProperties
messageClassNamestring
messageStyleCSSProperties
okClassNamestring
okStyleCSSProperties
okTextstring'OK'
cancelClassNamestring
cancelStyleCSSProperties
cancelTextstring'Cancel'

Tooltip

The position of the tooltip is calculated automatically.

<Tooltip message="Tooltip message">tooltip</Tooltip>

props

NameTypeDefaultDescription
styleCSSProperties
classNamestring
messageReactNode
messageStyleCSSProperties
messageClassNamestring
togglebooleanfalse

License

MIT © almond-bongbong

1.1.7

3 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago