Skip to content

Commit 092185f

Browse files
authored
Remove support for sx from CheckboxGroup component (#6655)
1 parent 513cc3f commit 092185f

File tree

5 files changed

+7
-76
lines changed

5 files changed

+7
-76
lines changed

.changeset/tame-ducks-ring.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": major
3+
---
4+
5+
Update CheckboxGroup component to no longer support sx

e2e/components/CheckboxGroup.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ const stories = [
2323
title: 'Visually Hidden Label',
2424
id: 'components-checkboxgroup-features--visually-hidden-label',
2525
},
26-
{
27-
title: 'SX Props',
28-
id: 'components-checkboxgroup-dev--sx-props',
29-
},
3026
] as const
3127

3228
test.describe('CheckboxGroup', () => {

packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx

Lines changed: 0 additions & 48 deletions
This file was deleted.

packages/react/src/CheckboxGroup/CheckboxGroup.docs.json

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@
6161
"type": "boolean",
6262
"defaultValue": "false",
6363
"description": "If true, the user must make a selection before the owning form can be submitted"
64-
},
65-
{
66-
"name": "sx",
67-
"type": "SystemStyleObject",
68-
"deprecated": true
6964
}
7065
],
7166
"subcomponents": [
@@ -77,11 +72,6 @@
7772
"type": "boolean",
7873
"defaultValue": "false",
7974
"description": "If true, the fieldset legend will be visually hidden"
80-
},
81-
{
82-
"name": "sx",
83-
"type": "SystemStyleObject",
84-
"deprecated": true
8575
}
8676
]
8777
},
@@ -93,11 +83,6 @@
9383
"type": "React.ReactNode",
9484
"defaultValue": "",
9585
"description": "The caption content"
96-
},
97-
{
98-
"name": "sx",
99-
"type": "SystemStyleObject",
100-
"deprecated": true
10186
}
10287
]
10388
},
@@ -116,13 +101,8 @@
116101
"defaultValue": "",
117102
"required": true,
118103
"description": "Changes the visual style to match the validation status"
119-
},
120-
{
121-
"name": "sx",
122-
"type": "SystemStyleObject",
123-
"deprecated": true
124104
}
125105
]
126106
}
127107
]
128-
}
108+
}

packages/react/src/CheckboxGroup/CheckboxGroup.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import CheckboxOrRadioGroupCaption from '../internal/components/CheckboxOrRadioG
66
import CheckboxOrRadioGroupLabel from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel'
77
import CheckboxOrRadioGroupValidation from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation'
88
import {useRenderForcingRef} from '../hooks'
9-
import type {SxProp} from '../sx'
109
import FormControl from '../FormControl'
1110
import Checkbox from '../Checkbox/Checkbox'
1211
import {CheckboxGroupContext} from './CheckboxGroupContext'
@@ -16,8 +15,7 @@ type CheckboxGroupProps = {
1615
* An onChange handler that gets called when any of the checkboxes change
1716
*/
1817
onChange?: (selected: string[], e?: ChangeEvent<HTMLInputElement>) => void
19-
} & CheckboxOrRadioGroupProps &
20-
SxProp
18+
} & CheckboxOrRadioGroupProps
2119

2220
const CheckboxGroup: FC<React.PropsWithChildren<CheckboxGroupProps>> = ({children, disabled, onChange, ...rest}) => {
2321
const formControlComponentChildren = React.Children.toArray(children)

0 commit comments

Comments
 (0)