Skip to content

Commit

Permalink
add checkbox required prop (#45)
Browse files Browse the repository at this point in the history
* Add required prop to checkbox

* update packages

* revert update
  • Loading branch information
luisfilipegoncalves authored Apr 12, 2021
1 parent e3ae165 commit e892c37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/atoms/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface Props {
className?: string;
style?: CSSProperties;
dataTestId?: string;
required?: boolean;
}

const Checkbox = (props: Props) => {
Expand All @@ -29,6 +30,7 @@ const Checkbox = (props: Props) => {
className = 'checkbox',
style,
dataTestId,
required = false,
} = props;

return (
Expand All @@ -48,6 +50,7 @@ const Checkbox = (props: Props) => {
error={error}
disabled={disabled}
data-testid={dataTestId}
required={required}
/>
<Checkmark />
</CheckboxWrapper>
Expand Down

0 comments on commit e892c37

Please sign in to comment.