Skip to content

Commit

Permalink
fix: removed unnecessary props
Browse files Browse the repository at this point in the history
  • Loading branch information
hirotomoyamada committed Jun 9, 2023
1 parent 0e6ef97 commit b1581a6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/fresh-islands-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@yamada-ui/checkbox': patch
'@yamada-ui/radio': patch
---

Removed unnecessary props passed to DOM.
10 changes: 9 additions & 1 deletion packages/components/checkbox/src/checkbox-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ export const CheckboxGroup = forwardRef(
role='group'
direction={direction}
gap={gap ?? (direction === 'row' ? '1rem' : undefined)}
{...omitObject(props, ['value', 'defaultValue', 'onChange'])}
{...omitObject(props, [
'value',
'defaultValue',
'onChange',
'isInvalid',
'isDisabled',
'isRequired',
'isReadOnly',
])}
>
{children}
</Flex>
Expand Down
4 changes: 3 additions & 1 deletion packages/components/radio/src/radio-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ export const RadioGroup = forwardRef(
className={cx('ui-radio-group', className)}
direction={direction}
gap={gap ?? (direction === 'row' ? '1rem' : undefined)}
{...getContainerProps(omitObject(props, ['onChange']))}
{...getContainerProps(
omitObject(props, ['onChange', 'isInvalid', 'isDisabled', 'isRequired', 'isReadOnly']),
)}
>
{children}
</Flex>
Expand Down

0 comments on commit b1581a6

Please sign in to comment.