Skip to content

Commit e517b18

Browse files
committed
add label export
1 parent 59c0934 commit e517b18

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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}

packages/styled-react/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export {Button} from '@primer/react'
66
export {CheckboxGroup} from '@primer/react'
77
export {Details} from '@primer/react'
88
export {IconButton} from '@primer/react'
9-
export {Label} from '@primer/react'
109
export {ProgressBar} from '@primer/react'
1110
export {Select} from '@primer/react'
1211
export {Text} from '@primer/react'
@@ -35,6 +34,7 @@ export {Flash} from './components/Flash'
3534
export {FormControl, type FormControlProps} from './components/FormControl'
3635
export {Header, type HeaderProps} from './components/Header'
3736
export {Heading} from './components/Heading'
37+
export {Label, type LabelProps} from './components/Label'
3838
export {Link, type LinkProps} from './components/Link'
3939
export {LinkButton, type LinkButtonProps} from './components/LinkButton'
4040
export {NavList, type NavListProps} from './components/NavList'

0 commit comments

Comments
 (0)