mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-05 07:56:15 +02:00
ui(resources): tweak styling of resource list
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user