|
|
@ -9,14 +9,21 @@ interface Props extends LinkProps { |
|
|
|
|
|
|
|
|
|
|
|
export const ButtonLinkSecondary: React.FC<Props> = ({ href, children, ...restProps }) => { |
|
|
|
export const ButtonLinkSecondary: React.FC<Props> = ({ href, children, ...restProps }) => { |
|
|
|
const isExternal: boolean = href.toString().startsWith('http'); |
|
|
|
const isExternal: boolean = href.toString().startsWith('http'); |
|
|
|
|
|
|
|
|
|
|
|
const variant = LinkTheme.variants['button-link-secondary']; |
|
|
|
const variant = LinkTheme.variants['button-link-secondary']; |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Stack sx={{ mt: '0 !important' }} {...variant}> |
|
|
|
<Stack sx={{ mt: '0 !important' }} {...variant}> |
|
|
|
<NextLink href={href} passHref {...restProps}> |
|
|
|
{isExternal ? ( |
|
|
|
<Link variant='button-link-secondary' isExternal={isExternal}> |
|
|
|
<Link variant='button-link-secondary' href={href.toString()} isExternal> |
|
|
|
<Text textStyle='home-section-link-label'>{children}</Text> |
|
|
|
<Text textStyle='home-section-link-label'>{children}</Text> |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
</NextLink> |
|
|
|
) : ( |
|
|
|
|
|
|
|
<NextLink href={href.toString()} passHref {...restProps}> |
|
|
|
|
|
|
|
<Link variant='button-link-secondary'> |
|
|
|
|
|
|
|
<Text textStyle='home-section-link-label'>{children}</Text> |
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
</NextLink> |
|
|
|
|
|
|
|
)} |
|
|
|
</Stack> |
|
|
|
</Stack> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|