New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-tri-button

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tri-button

Component with triple state

latest
Source
npmnpm
Version
0.1.1-beta
Version published
Maintainers
1
Created
Source

react-tri-button

npm version

Component with triple state

Demo

준비중...

Install

$ npm install react-tri-button --save

or 

$ yarn install react-tri-button

Scripts

build

npm run build

Components

  • Pending Button
  • [WIP] Tri Button
  • [WIP] Tri Checkbox

Pending Button

If you fetching whne you clicked button, clicked button is going to unclickable and come back finishing fetching.

Props

  • timeout
  • fetchingText
  • successText
  • failText
  • fetchMode
  • logging
propsdescriptiontypeisRequired / default
timeoutfetching 과정중, timeout에서 지정한 시간이 지난 후에도 fetching이 되지 않은경우 fetching을 종료하고, 실패로 처리한다.number (milisecond)false / 0
fetchingTextfetch 중에 있을때 표시되는 textstringfalse / ''
successTextfetch가 성공했을때 표시되는 textstringfalse / ''
failTextfetch가 성공했을때 표시되는 textstringfalse / ''
fetchModefetch를 순차적으로 할지, 비동기로 할지 결정enum ('sequence', 'inconsecutive')false / 'sequence'
logginglogging 한다.booleanfalse / false

Event

  • onStateChanged
  • onFetching
  • onError
  • onSuccess
  • onFail
  • onProcess

Tri-Button

Tri-Checkbox

Tri-Checkbox has 3-state. unchecked, checked and intermediate.

Props

  • checked
  • indeterminate
  • checkingText
  • uncheckingText
  • intermediatingText
  • propagation
  • (WIP) checkedIcon
propsdescriptiontypeisRequired / default
checked체크박스 체크여부booleanfalse / false
indeterminate제 3의 상태boolean''
checkingTextstring''
uncheckingTextstring''
intermediatingTextenum ('sequence', 'inconsecutive')false / 'sequence'
propagation상위나 하위의 체크박으로 인해 자신이 전파를 받는지 여부booleanfalse / true
checkedIconbooleanfalse / false

Event

  • onChange

Form

Event

  • onSubmit

Usage

import React from 'react'
import {PendingButton} from 'react-tri-button'

class App extends React.Component {

  render () {
    return (
      <PendingButton onFetching={this.onFetchingList} onError={this.onError} onSuccess={this.onSuccess}>
        Pending Button
      </PendingButton>
    )
  }
}

License

react-tri-button is MIT licensed.

Keywords

react button

FAQs

Package last updated on 20 Nov 2019

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