npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-tri-button

v0.1.1-beta

Published

Component with triple state

Downloads

32

Readme

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

| props | description | type | isRequired / default | |-------|-------|:------:|:------:| | timeout | fetching 과정중, timeout에서 지정한 시간이 지난 후에도 fetching이 되지 않은경우 fetching을 종료하고, 실패로 처리한다. | number (milisecond) | false / 0 | | fetchingText | fetch 중에 있을때 표시되는 text | string | false / '' | | successText | fetch가 성공했을때 표시되는 text | string | false / '' | | failText | fetch가 성공했을때 표시되는 text | string | false / '' | | fetchMode | fetch를 순차적으로 할지, 비동기로 할지 결정 | enum ('sequence', 'inconsecutive') | false / 'sequence' | | logging | logging 한다. | boolean | false / 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

| props | description | type | isRequired / default | |-------|-------|:------:|:------:| |checked|체크박스 체크여부|boolean|false / false| |indeterminate|제 3의 상태|boolean|''| |checkingText|| string |''| |uncheckingText|| string |''| | intermediatingText|| enum ('sequence', 'inconsecutive') | false / 'sequence' | |propagation|상위나 하위의 체크박으로 인해 자신이 전파를 받는지 여부|boolean|false / true| | checkedIcon || boolean | false / 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.