Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tame-ducks-ring.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
"@primer/react": major
---

Update CheckboxGroup component to no longer support sx
4 changes: 0 additions & 4 deletions e2e/components/CheckboxGroup.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,10 +23,6 @@ const stories = [
title: 'Visually Hidden Label',
id: 'components-checkboxgroup-features--visually-hidden-label',
},
{
title: 'SX Props',
id: 'components-checkboxgroup-dev--sx-props',
},
] as const

test.describe('CheckboxGroup', () => {
Expand Down
48 changes: 0 additions & 48 deletions packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx

This file was deleted.

22 changes: 1 addition & 21 deletions packages/react/src/CheckboxGroup/CheckboxGroup.docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,11 +61,6 @@
"type": "boolean",
"defaultValue": "false",
"description": "If true, the user must make a selection before the owning form can be submitted"
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
],
"subcomponents": [
Expand All@@ -77,11 +72,6 @@
"type": "boolean",
"defaultValue": "false",
"description": "If true, the fieldset legend will be visually hidden"
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
]
},
Expand All@@ -93,11 +83,6 @@
"type": "React.ReactNode",
"defaultValue": "",
"description": "The caption content"
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
]
},
Expand All@@ -116,13 +101,8 @@
"defaultValue": "",
"required": true,
"description": "Changes the visual style to match the validation status"
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
]
}
]
}
}
4 changes: 1 addition & 3 deletions packages/react/src/CheckboxGroup/CheckboxGroup.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,6 @@ import CheckboxOrRadioGroupCaption from '../internal/components/CheckboxOrRadioG
import CheckboxOrRadioGroupLabel from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel'
import CheckboxOrRadioGroupValidation from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation'
import {useRenderForcingRef} from '../hooks'
import type {SxProp} from '../sx'
import FormControl from '../FormControl'
import Checkbox from '../Checkbox/Checkbox'
import {CheckboxGroupContext} from './CheckboxGroupContext'
Expand All@@ -16,8 +15,7 @@ type CheckboxGroupProps = {
* An onChange handler that gets called when any of the checkboxes change
*/
onChange?: (selected: string[], e?: ChangeEvent<HTMLInputElement>) => void
} & CheckboxOrRadioGroupProps &
SxProp
} & CheckboxOrRadioGroupProps

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