A toggle with an icon and a label.
You need to include this in another library that builds react aka (babel).
We assume that you have a loader that will load in .less
. In the demo we use style-loader!css-loader!less-loader
.
npm install
npm test
cd demo
../node_modules/.bin/webpack-dev-server --hot --inline
# go to http://localhost:8080
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>;
}
gulp release
git checkout master
npm publish