Skip to content

Commit

Permalink
refactor: remove defaultchecked prop (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanberg committed Aug 16, 2019
1 parent b902d41 commit e9eb338
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/components/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Checkbox = ({
label,
labelPosition,
value,
defaultChecked,
readonly,
disabled,
style,
Expand All @@ -19,19 +18,13 @@ const Checkbox = ({
return (
<InputWrap labelPosition={labelPosition} style={style}>
{label && <InputLabelText>{label}</InputLabelText>}
<CheckboxBox
defaultChecked={defaultChecked}
value={value}
disabled={disabled}
{...props}
/>
<CheckboxBox value={value} disabled={disabled} {...props} />
</InputWrap>
);
};

Checkbox.propTypes = {
checked : PropTypes.bool,
defaultChecked: PropTypes.bool,
checked: PropTypes.bool,
disabled: PropTypes.bool,
label: PropTypes.string.isRequired,
labelPosition: PropTypes.oneOf(["top", "bottom", "left", "right"]),
Expand All @@ -42,7 +35,6 @@ Checkbox.propTypes = {
};

Checkbox.defaultProps = {
defaultChecked: false,
disabled: false,
labelPosition: "right",
readonly: false
Expand Down

0 comments on commit e9eb338

Please sign in to comment.