Skip to content

utopiaio/Cheggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Checkbox + Toggle = Cheggle™

Cheggle

React Component that displays a checkbox or a toggle depending on the platform.

Most of Cheggle styling taken from ionic framework with minor tweaks.

Installation

npm install cheggle --save

Usage

  import Cheggle from 'cheggle';

  <Cheggle
    value={this.state.cheggle}
    platform={this.state.platform}
    watchPlatform={this.state.watchPlatform}
    onChange={(e) => this.handleChange(e)}
    disabled={this.state.disabled}
  />

  /**
   * PropTypes
   *
   * value <bool>: value to render as Cheggle. default: false
   * platform <string>: platform to render as iOS, Android or Desktop. default: 'auto'
   * watchPlatform <bool>: watch platform change. default: false
   * onChange <func>: function that'll be called with new value.
   * disabled <bool>: disable Cheggle. default: false
   */

Releases

No releases published

Packages

No packages published