Skip to content

Commit ead3f53

Browse files
committed
mark SwitchGroup as deprecated
Also updated the `Switch.Group` message to also prefer the `<Field>` component.
1 parent 7fcb410 commit ead3f53

File tree

1 file changed

+2
-1
lines changed
  • packages/@headlessui-react/src/components/switch

1 file changed

+2
-1
lines changed

packages/@headlessui-react/src/components/switch/switch.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,15 @@ export interface _internal_ComponentSwitchLabel extends _internal_ComponentLabel
269269
export interface _internal_ComponentSwitchDescription extends _internal_ComponentDescription {}
270270

271271
let SwitchRoot = forwardRefWithAs(SwitchFn) as _internal_ComponentSwitch
272+
/** @deprecated use `<Field>` instead of `<SwitchGroup>` */
272273
export let SwitchGroup = GroupFn as _internal_ComponentSwitchGroup
273274
/** @deprecated use `<Label>` instead of `<SwitchLabel>` */
274275
export let SwitchLabel = Label as _internal_ComponentSwitchLabel
275276
/** @deprecated use `<Description>` instead of `<SwitchDescription>` */
276277
export let SwitchDescription = Description as _internal_ComponentSwitchDescription
277278

278279
export let Switch = Object.assign(SwitchRoot, {
279-
/** @deprecated use `<SwitchGroup>` instead of `<Switch.Group>` */
280+
/** @deprecated use `<Field>` instead of `<Switch.Group>` */
280281
Group: SwitchGroup,
281282
/** @deprecated use `<Label>` instead of `<Switch.Label>` */
282283
Label: SwitchLabel,

0 commit comments

Comments
 (0)