@pie-lib/correct-answer-toggle

2.5.12 • Public • Published

corespring-correct-answer-toggle

Build Status

A toggle with an icon and a label.

Preview

Usage

You need to include this in another library that builds react aka (babel).

Webpack

We assume that you have a loader that will load in .less. In the demo we use style-loader!css-loader!less-loader.

Install

npm install 

Test

npm test

Demo

cd demo 
../node_modules/.bin/webpack-dev-server --hot --inline
# go to http://localhost:8080

Usage

import Toggle from 'corespring-correct-answer-toggle'; 

function onToggle(toggled){
  console.log('on toggle: ', toggled);
}

const MyComp = (props) => {
  return <div>
    <Toggle 
      show={props.show} 
      onToggle={onToggle} 
      initialValue={false}/>
  </div>;
}

Release

gulp release
git checkout master
npm publish

/@pie-lib/correct-answer-toggle/

    Package Sidebar

    Install

    npm i @pie-lib/correct-answer-toggle

    Weekly Downloads

    137

    Version

    2.5.12

    License

    ISC

    Unpacked Size

    89.1 kB

    Total Files

    15

    Last publish

    Collaborators

    • iacoshoria
    • andreeapescar
    • chillenious
    • ed.eustace
    • lakatosandrei