Skip to content

Commit

Permalink
[@mantine/core] Add data-checked attribute to Checkbox, Radio and Swi…
Browse files Browse the repository at this point in the history
…tch when components are used within groups
  • Loading branch information
rtivital committed Oct 26, 2022
1 parent 39535c8 commit 2aeefd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mantine-core/src/Checkbox/Checkbox.tsx
Expand Up @@ -136,6 +136,7 @@ export const Checkbox: CheckboxComponent = forwardRef<HTMLInputElement, Checkbox
classNames={classNames}
styles={styles}
unstyled={unstyled}
data-checked={contextProps.checked || undefined}
{...systemStyles}
{...wrapperProps}
>
Expand Down
1 change: 1 addition & 0 deletions src/mantine-core/src/Radio/Radio.tsx
Expand Up @@ -116,6 +116,7 @@ export const Radio: RadioComponent = forwardRef<HTMLInputElement, RadioProps>((p
classNames={classNames}
styles={styles}
unstyled={unstyled}
data-checked={contextProps.checked || undefined}
{...systemStyles}
{...wrapperProps}
>
Expand Down
1 change: 1 addition & 0 deletions src/mantine-core/src/Switch/Switch.tsx
Expand Up @@ -134,6 +134,7 @@ export const Switch: SwitchComponent = forwardRef<HTMLInputElement, SwitchProps>
classNames={classNames}
styles={styles}
unstyled={unstyled}
data-checked={contextProps.checked || undefined}
{...systemStyles}
{...wrapperProps}
>
Expand Down

0 comments on commit 2aeefd6

Please sign in to comment.