ui(resources): tweak styling of resource list

This commit is contained in:
Jean-Philippe Sirois
2020-05-26 03:49:17 -04:00
parent bf3df759af
commit c83701ec58
3 changed files with 25 additions and 30 deletions
+7 -3
View File
@@ -5,13 +5,17 @@ interface ILinkProps {
to: string
}
export const Link: FC<ILinkProps> = ({ children, to }) => {
export const Link: FC<ILinkProps> = ({ children, to, ...props }) => {
if (!to.match(/^(https?:\/\/)/)) {
return <SC.LinkInternal to={to}>{children}</SC.LinkInternal>
return (
<SC.LinkInternal {...props} to={to}>
{children}
</SC.LinkInternal>
)
}
return (
<SC.LinkExternal rel="noreferrer" href={to} target="_blank">
<SC.LinkExternal {...props} rel="noreferrer" href={to} target="_blank">
{children}
</SC.LinkExternal>
)