File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
packages/react/src/VisuallyHidden Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @primer/react ' : major
3
+ ---
4
+
5
+ Remove sx prop support from the VisuallyHidden component
Original file line number Diff line number Diff line change 1
- import type { SxProp } from '../sx'
2
1
import { clsx } from 'clsx'
3
2
import type React from 'react'
4
3
import { type HTMLAttributes } from 'react'
5
4
import classes from './VisuallyHidden.module.css'
6
- import { BoxWithFallback } from '../internal/components/BoxWithFallback'
7
5
8
6
/**
9
7
* Provides a component that implements the "visually hidden" technique. This is
@@ -17,14 +15,14 @@ import {BoxWithFallback} from '../internal/components/BoxWithFallback'
17
15
*/
18
16
export const VisuallyHidden = ( { className, children, ...rest } : VisuallyHiddenProps ) => {
19
17
return (
20
- < BoxWithFallback as = " span" className = { clsx ( className , classes . VisuallyHidden ) } { ...rest } >
18
+ < span className = { clsx ( className , classes . VisuallyHidden ) } { ...rest } >
21
19
{ children }
22
- </ BoxWithFallback >
20
+ </ span >
23
21
)
24
22
}
25
23
26
24
export type VisuallyHiddenProps = React . PropsWithChildren <
27
25
HTMLAttributes < HTMLSpanElement > & {
28
26
className ?: string
29
- } & SxProp
27
+ }
30
28
>
You can’t perform that action at this time.
0 commit comments