Skip to content

feat: Add required and default value options #1193

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

Merged
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
122 changes: 107 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"react-helmet": "5.2.1",
"react-redux": "5.1.1",
"react-router": "5.0.1",
"react-router-dom": "5.0.1"
"react-router-dom": "5.0.1",
"semver": "^6.3.0"
},
"devDependencies": {
"@babel/core": "7.5.5",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Toggle/Toggle.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class Toggle extends React.Component {
toggleClasses.push(styles.darkBg);
}
return (
<div className={toggleClasses.join(' ')}>
<div className={toggleClasses.join(' ')} style={this.props.additionalStyles || {}}>
<span className={styles.label} onClick={this.toLeft.bind(this)}>{labelLeft}</span>
<span className={switchClasses.join(' ')} onClick={this.toggle.bind(this)}></span>
<span className={styles.label} onClick={this.toRight.bind(this)}>{labelRight}</span>
Expand All @@ -122,6 +122,7 @@ Toggle.propTypes = {
labelRight: PropTypes.string.describe('Custom right toggle label, case when label does not equal content. [For Toggle.Type.CUSTOM]'),
colored: PropTypes.bool.describe('Flag describing is toggle is colored. [For Toggle.Type.CUSTOM]'),
darkBg: PropTypes.bool,
additionalStyles: PropTypes.object.describe('Additional styles for Toggle component.'),
};

Toggle.Types = {
Expand Down
Loading