(props: LinkProps)
| 12 | } |
| 13 | |
| 14 | export function Link(props: LinkProps) { |
| 15 | let ref = useRef<HTMLAnchorElement>(null); |
| 16 | let {linkProps, isPressed} = useLink(props, ref); |
| 17 | let {hoverProps, isHovered} = useHover(props); |
| 18 | let {focusProps, isFocusVisible} = useFocusRing(); |
| 19 | |
| 20 | return ( |
| 21 | <a |
| 22 | {...mergeProps(linkProps, hoverProps, focusProps)} |
| 23 | ref={ref} |
| 24 | href={props.href} |
| 25 | target={props.target} |
| 26 | className="react-aria-Link" |
| 27 | data-hovered={isHovered || undefined} |
| 28 | data-pressed={isPressed || undefined} |
| 29 | data-focus-visible={isFocusVisible || undefined} |
| 30 | data-disabled={props.isDisabled || undefined}> |
| 31 | {props.children} |
| 32 | </a> |
| 33 | ); |
| 34 | } |
nothing calls this directly
no test coverage detected