Skip to content

Commit b8ddce6

Browse files
alencarlucasdplewis
authored andcommitted
feat: Add required and default value options (#1193)
* feat: Add additional styles for toggle component * feat: Add required property on create new column action * fix: PIG routes * feat: Add default value option on add column * fix: Default value for files not working * fix: GeoPoint validation * feat: Check parse-server version before render schema options * fix: Array default value validation * chore: Update package-lock * fix: Grammar issues
1 parent c72ba90 commit b8ddce6

File tree

8 files changed

+289
-37
lines changed

8 files changed

+289
-37
lines changed

package-lock.json

Lines changed: 107 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"react-helmet": "5.2.1",
6666
"react-redux": "5.1.1",
6767
"react-router": "5.0.1",
68-
"react-router-dom": "5.0.1"
68+
"react-router-dom": "5.0.1",
69+
"semver": "^6.3.0"
6970
},
7071
"devDependencies": {
7172
"@babel/core": "7.5.5",

src/components/Toggle/Toggle.react.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default class Toggle extends React.Component {
100100
toggleClasses.push(styles.darkBg);
101101
}
102102
return (
103-
<div className={toggleClasses.join(' ')}>
103+
<div className={toggleClasses.join(' ')} style={this.props.additionalStyles || {}}>
104104
<span className={styles.label} onClick={this.toLeft.bind(this)}>{labelLeft}</span>
105105
<span className={switchClasses.join(' ')} onClick={this.toggle.bind(this)}></span>
106106
<span className={styles.label} onClick={this.toRight.bind(this)}>{labelRight}</span>
@@ -122,6 +122,7 @@ Toggle.propTypes = {
122122
labelRight: PropTypes.string.describe('Custom right toggle label, case when label does not equal content. [For Toggle.Type.CUSTOM]'),
123123
colored: PropTypes.bool.describe('Flag describing is toggle is colored. [For Toggle.Type.CUSTOM]'),
124124
darkBg: PropTypes.bool,
125+
additionalStyles: PropTypes.object.describe('Additional styles for Toggle component.'),
125126
};
126127

127128
Toggle.Types = {

0 commit comments

Comments
 (0)