Skip to content

Commit

Permalink
Merge pull request #1693 from pbambusek/enhanced-switch
Browse files Browse the repository at this point in the history
[EnhancedSwitch] added inputStyle prop to enhanced switch
  • Loading branch information
oliviertassinari committed Feb 5, 2016
2 parents 0559b09 + 5cd2463 commit 4206458
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const Checkbox = React.createClass({
*/
iconStyle: React.PropTypes.object,

/**
* Overrides the inline-styles of the input element.
*/
inputStyle: React.PropTypes.object,

/**
* Where the label will be placed next to the checkbox.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/enhanced-switch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const EnhancedSwitch = React.createClass({
disabled: React.PropTypes.bool,
iconStyle: React.PropTypes.object,
id: React.PropTypes.string,
inputStyle: React.PropTypes.object,
inputType: React.PropTypes.string.isRequired,
label: React.PropTypes.node,
labelPosition: React.PropTypes.oneOf(['left', 'right']),
Expand Down Expand Up @@ -361,7 +362,7 @@ const EnhancedSwitch = React.createClass({
const inputProps = {
ref: 'checkbox',
type: this.props.inputType,
style: this.prepareStyles(styles.input),
style: this.prepareStyles(styles.input, this.props.inputStyle),
name: this.props.name,
value: this.props.value,
defaultChecked: this.props.defaultSwitched,
Expand Down
5 changes: 5 additions & 0 deletions src/radio-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const RadioButton = React.createClass({
*/
iconStyle: React.PropTypes.object,

/**
* Overrides the inline-styles of the input element.
*/
inputStyle: React.PropTypes.object,

/**
* Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead.
*/
Expand Down
5 changes: 5 additions & 0 deletions src/toggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ const Toggle = React.createClass({
*/
iconStyle: React.PropTypes.object,

/**
* Overrides the inline-styles of the input element.
*/
inputStyle: React.PropTypes.object,

/**
* Where the label will be placed next to the toggle.
*/
Expand Down

0 comments on commit 4206458

Please sign in to comment.