Skip to content

Commit

Permalink
minor fix and update
Browse files Browse the repository at this point in the history
  • Loading branch information
gfazioli committed Dec 30, 2016
1 parent 7debf75 commit 3e67379
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
15 changes: 15 additions & 0 deletions example/dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ var App = React.createClass({
var code = [{
label: "Simple usage",
code: '<SwitchButton name="switch-1" />', object: React.createElement(SwitchButton, { theme: this.state.theme, name: 'switch-1' })
}, {
label: "Set Theme",
code: '<SwitchButton name="switch-1t" theme="rsbc-switch-button-flat-square" defaultChecked={true} />',
object: React.createElement(SwitchButton, { name: 'switch-1t',
theme: 'rsbc-switch-button-flat-square',
defaultChecked: true })
}, {
label: "Set initial status",
code: '<SwitchButton name="switch-2" defaultChecked={true} />',
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions example/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ const App = React.createClass( {
label : "Simple usage",
code : '<SwitchButton name="switch-1" />', object : <SwitchButton theme={this.state.theme} name="switch-1"/>
},
{
label : "Set Theme",
code : '<SwitchButton name="switch-1t" theme="rsbc-switch-button-flat-square" defaultChecked={true} />',
object : <SwitchButton name="switch-1t"
theme="rsbc-switch-button-flat-square"
defaultChecked={true}/>
},
{
label : "Set initial status",
code : '<SwitchButton name="switch-2" defaultChecked={true} />',
Expand Down Expand Up @@ -100,6 +107,11 @@ const App = React.createClass( {
return (
<div className="examples">
<h1>Say Hello, React Switch Button</h1>

<div className="example">
<h3>New in v.2.1.0</h3>
</div>

<SwitchButton name="switch-theme" label="Switch Theme" onChange={this.onChange} />
<hr/>
{rows}
Expand Down

0 comments on commit 3e67379

Please sign in to comment.