Skip to content

Commit

Permalink
feat(Checkbox): make checkboxId required
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnau-mnau committed Nov 29, 2023
1 parent 6823fb8 commit 7833266
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/forms/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(

Checkbox.propTypes = {
name: PropTypes.string.isRequired,
checkboxId: PropTypes.string,
checkboxId: PropTypes.string.isRequired,
label: PropTypes.node,
className: PropTypes.string,
isDisabled: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/Checkbox/Checkbox.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TogglingProps } from '../types/forms.types';

export interface CheckboxProps extends TogglingProps {
checkboxId?: string;
checkboxId: string;
className?: string;
}
1 change: 1 addition & 0 deletions src/components/forms/Select/Select.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ export const Option: ComponentType<OptionProps<OptionType, boolean>> = (
<components.Option {...props}>
<Inline gap={SpaceSizes.sm}>
<Checkbox
checkboxId="select"
checked={isSelected}
isDisabled={isDisabled}
label={children}
Expand Down

0 comments on commit 7833266

Please sign in to comment.