Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EnhancedSwitch] added inputStyle prop to enhanced switch #1693

Merged
merged 1 commit into from
Feb 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -28,6 +28,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