From 3e67379fb421aa05db7bde35bd13dcf0bd791a21 Mon Sep 17 00:00:00 2001 From: John Fazioli Date: Fri, 30 Dec 2016 13:37:39 +0100 Subject: [PATCH] minor fix and update --- README.md | 6 ++---- example/dist/app.js | 15 +++++++++++++++ example/src/app.js | 12 ++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 46b7d36..52c340f 100755 --- a/README.md +++ b/README.md @@ -2,17 +2,15 @@ A Switch control built with and for [React](http://facebook.github.io/react/index.html) -## New version 2.0.0 +## New version 2.1.0 -I've rewritten the component model with some alignment for ES6. +Add square theme. ## Demo & Example Example: [http://gfazioli.github.io/react-switch-button](http://gfazioli.github.io/react-switch-button) Live demo: [Online Demo](http://gfazioli.github.io/react-switch-button#demo) -![schermata 2016-09-16 alle 15 49 23](https://cloud.githubusercontent.com/assets/432181/18588077/42623d26-7c25-11e6-9e43-4043ac288d0a.png) - ## Installation You can use React Switch Button by using NPM and include it in your own React build process (using [Browserify](http://browserify.org), etc). diff --git a/example/dist/app.js b/example/dist/app.js index e749b29..62ac9f4 100644 --- a/example/dist/app.js +++ b/example/dist/app.js @@ -28,6 +28,12 @@ var App = React.createClass({ var code = [{ label: "Simple usage", code: '', object: React.createElement(SwitchButton, { theme: this.state.theme, name: 'switch-1' }) + }, { + label: "Set Theme", + code: '', + object: React.createElement(SwitchButton, { name: 'switch-1t', + theme: 'rsbc-switch-button-flat-square', + defaultChecked: true }) }, { label: "Set initial status", code: '', @@ -105,6 +111,15 @@ var App = React.createClass({ null, 'Say Hello, React Switch Button' ), + React.createElement( + 'div', + { className: 'example' }, + React.createElement( + 'h3', + null, + 'New in v.2.1.0' + ) + ), React.createElement(SwitchButton, { name: 'switch-theme', label: 'Switch Theme', onChange: this.onChange }), React.createElement('hr', null), rows diff --git a/example/src/app.js b/example/src/app.js index 33bdf26..1444fdc 100755 --- a/example/src/app.js +++ b/example/src/app.js @@ -30,6 +30,13 @@ const App = React.createClass( { label : "Simple usage", code : '', object : }, + { + label : "Set Theme", + code : '', + object : + }, { label : "Set initial status", code : '', @@ -100,6 +107,11 @@ const App = React.createClass( { return (

Say Hello, React Switch Button

+ +
+

New in v.2.1.0

+
+
{rows}