warnings/widgets: forID is not required + typo
This commit is contained in:
parent
e23f7e69dd
commit
38cb065570
@ -4,10 +4,10 @@ import Switch from 'react-toolbox/lib/switch';
|
|||||||
|
|
||||||
export default class BooleanControl extends React.Component {
|
export default class BooleanControl extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { value, field, forId, onChange } = this.props;
|
const { value, field, forID, onChange } = this.props;
|
||||||
return (
|
return (
|
||||||
<Switch
|
<Switch
|
||||||
id={forId}
|
id={forID}
|
||||||
checked={value === undefined ? field.get('defaultValue', false) : value}
|
checked={value === undefined ? field.get('defaultValue', false) : value}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
/>
|
/>
|
||||||
@ -18,6 +18,6 @@ export default class BooleanControl extends React.Component {
|
|||||||
BooleanControl.propTypes = {
|
BooleanControl.propTypes = {
|
||||||
field: ImmutablePropTypes.map.isRequired,
|
field: ImmutablePropTypes.map.isRequired,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
value: PropTypes.bool,
|
value: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ export default class ListControl extends Component {
|
|||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
value: PropTypes.node,
|
value: PropTypes.node,
|
||||||
field: PropTypes.node,
|
field: PropTypes.node,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
getAsset: PropTypes.func.isRequired,
|
getAsset: PropTypes.func.isRequired,
|
||||||
onAddAsset: PropTypes.func.isRequired,
|
onAddAsset: PropTypes.func.isRequired,
|
||||||
onRemoveAsset: PropTypes.func.isRequired,
|
onRemoveAsset: PropTypes.func.isRequired,
|
||||||
|
@ -13,5 +13,5 @@ export default class StringControl extends React.Component {
|
|||||||
StringControl.propTypes = {
|
StringControl.propTypes = {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
value: PropTypes.node,
|
value: PropTypes.node,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@ export default class ObjectControl extends Component {
|
|||||||
getAsset: PropTypes.func.isRequired,
|
getAsset: PropTypes.func.isRequired,
|
||||||
value: PropTypes.node,
|
value: PropTypes.node,
|
||||||
field: PropTypes.object,
|
field: PropTypes.object,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,6 +12,6 @@ export default class StringControl extends React.Component {
|
|||||||
|
|
||||||
StringControl.propTypes = {
|
StringControl.propTypes = {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
value: PropTypes.node,
|
value: PropTypes.node,
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,6 @@ export default class StringControl extends React.Component {
|
|||||||
|
|
||||||
StringControl.propTypes = {
|
StringControl.propTypes = {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
forID: PropTypes.string.isRequired,
|
forID: PropTypes.string,
|
||||||
value: PropTypes.node,
|
value: PropTypes.node,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user