File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
packages/styled-react/src Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ import { type LabelProps as PrimerLabelProps , Label as PrimerLabel , Box } from '@primer/react'
2+ import { type SxProp } from '../sx'
3+ import { forwardRef } from 'react'
4+ import type { ForwardRefComponent } from '../polymorphic'
5+
6+ type LabelProps = PrimerLabelProps & SxProp
7+
8+ const Label = forwardRef ( function Label ( props , ref ) {
9+ return < Box as = { PrimerLabel } ref = { ref } { ...props } />
10+ } ) as ForwardRefComponent < 'span' , LabelProps >
11+
12+ export { Label , type LabelProps }
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ export {Button} from '@primer/react'
66export { CheckboxGroup } from '@primer/react'
77export { Details } from '@primer/react'
88export { IconButton } from '@primer/react'
9- export { Label } from '@primer/react'
109export { ProgressBar } from '@primer/react'
1110export { Select } from '@primer/react'
1211export { Text } from '@primer/react'
@@ -35,6 +34,7 @@ export {Flash} from './components/Flash'
3534export { FormControl , type FormControlProps } from './components/FormControl'
3635export { Header , type HeaderProps } from './components/Header'
3736export { Heading } from './components/Heading'
37+ export { Label , type LabelProps } from './components/Label'
3838export { Link , type LinkProps } from './components/Link'
3939export { LinkButton , type LinkButtonProps } from './components/LinkButton'
4040export { NavList , type NavListProps } from './components/NavList'
You can’t perform that action at this time.
0 commit comments