🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-interaction

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-interaction

Collection of components for interaction

1.1.7
unpublished
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

react

FAQs

Package last updated on 27 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts