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/fair-views-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Remove sx support from Radio
17 changes: 0 additions & 17 deletions packages/react/src/Radio/Radio.dev.stories.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions packages/react/src/Radio/Radio.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,6 @@
{
"name": "ref",
"type": "React.RefObject<HTMLInputElement>"
},
{
"name": "as",
"type": "React.ElementType",
"defaultValue": "\"input\""
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
],
"subcomponents": []
Expand Down
8 changes: 2 additions & 6 deletions packages/react/src/Radio/Radio.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import type {ChangeEventHandler, InputHTMLAttributes, ReactElement} from 'react'
import React, {useContext} from 'react'
import type {SxProp} from '../sx'
import {RadioGroupContext} from '../RadioGroup/RadioGroup'
import {clsx} from 'clsx'
import sharedClasses from '../Checkbox/shared.module.css'
import classes from './Radio.module.css'
import {BoxWithFallback} from '../internal/components/BoxWithFallback'

export type RadioProps = {
/**
Expand Down Expand Up @@ -33,8 +31,7 @@ export type RadioProps = {
* Indicates whether the radio button must be checked before the form can be submitted
*/
required?: boolean
} & InputHTMLAttributes<HTMLInputElement> &
SxProp
} & InputHTMLAttributes<HTMLInputElement>

/**
* An accessible, native radio component for selecting one option from a list.
Expand Down Expand Up @@ -69,8 +66,7 @@ const Radio = React.forwardRef<HTMLInputElement, RadioProps>(
}

return (
<BoxWithFallback
as="input"
<input
type="radio"
value={value}
name={name}
Expand Down
Loading