({href, ...props}: LinkProps)
| 26 | } |
| 27 | |
| 28 | export function Link({href, ...props}: LinkProps) { |
| 29 | if (href?.startsWith('s2:') || href?.startsWith('react-aria:')) { |
| 30 | let url = new URL(href); |
| 31 | href = getBaseUrl(url.protocol.slice(0, -1) as any) + '/' + url.pathname; |
| 32 | } |
| 33 | |
| 34 | return <S2Link {...props} ref={registerSpectrumLink} href={href} {...getAnchorProps(href)} />; |
| 35 | } |
| 36 | |
| 37 | export function LinkButton({href, ...props}: LinkButtonProps) { |
| 38 | if (href?.startsWith('s2:') || href?.startsWith('react-aria:')) { |
nothing calls this directly
no test coverage detected