({
children,
...props
}: Omit<TagProps, 'children'> & {
children?: React.ReactNode;
})
| 44 | } |
| 45 | |
| 46 | export function Tag({ |
| 47 | children, |
| 48 | ...props |
| 49 | }: Omit<TagProps, 'children'> & { |
| 50 | children?: React.ReactNode; |
| 51 | }) { |
| 52 | let textValue = typeof children === 'string' ? children : undefined; |
| 53 | return ( |
| 54 | <AriaTag textValue={textValue} {...props} className="react-aria-Tag button-base"> |
| 55 | {({allowsRemoving}) => ( |
| 56 | <> |
| 57 | {children} |
| 58 | {allowsRemoving && ( |
| 59 | <Button slot="remove" className="remove-button"> |
| 60 | <X /> |
| 61 | </Button> |
| 62 | )} |
| 63 | </> |
| 64 | )} |
| 65 | </AriaTag> |
| 66 | ); |
| 67 | } |
nothing calls this directly
no outgoing calls
no test coverage detected