GithubHelp home page GithubHelp logo

manprajapat / react-interaction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from almond-bongbong/react-interaction

0.0 1.0 0.0 18.55 MB

Collection of components for interaction

Home Page: https://almond-bongbong.github.io/react-interaction/

HTML 1.94% JavaScript 37.19% CSS 14.42% TypeScript 46.45%

react-interaction's Introduction

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

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

react-interaction's People

Contributors

almond-bongbong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.