Skip to content

Commit 750fed2

Browse files
committed
fix(Checkbox): do not extract inputStyles from props
1 parent 3101f37 commit 750fed2

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.changeset/twenty-terms-explain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Do not extract inputStyles from props in Checkbox.

src/components/fields/Checkbox/Checkbox.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import { useToggleState } from 'react-stately';
1111
import { useProviderProps } from '../../../provider';
1212
import {
1313
BaseProps,
14-
BLOCK_STYLES,
14+
CONTAINER_STYLES,
15+
ContainerStyleProps,
1516
Element,
1617
extractStyles,
1718
filterBaseProps,
18-
OUTER_STYLES,
1919
Styles,
2020
tasty,
2121
} from '../../../tasty';
@@ -43,6 +43,7 @@ import type { FocusableRef } from '@react-types/shared';
4343

4444
export interface CubeCheckboxProps
4545
extends BaseProps,
46+
ContainerStyleProps,
4647
AriaCheckboxProps,
4748
FieldBaseProps {
4849
inputStyles?: Styles;
@@ -159,9 +160,7 @@ function Checkbox(
159160
...otherProps
160161
} = props;
161162

162-
let styles: Styles = extractStyles(props, OUTER_STYLES);
163-
164-
inputStyles = extractStyles(props, BLOCK_STYLES, inputStyles);
163+
let styles: Styles = extractStyles(props, CONTAINER_STYLES);
165164

166165
labelStyles = useMemo(
167166
() => ({

0 commit comments

Comments
 (0)