mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
29 lines
531 B
TypeScript
29 lines
531 B
TypeScript
import { Anchor } from '@mantine/core';
|
|
import { AnchorHTMLAttributes, CSSProperties, ReactNode } from 'react';
|
|
|
|
interface ExternalLinkStyledProps
|
|
extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
children: ReactNode;
|
|
style?: CSSProperties;
|
|
title?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export const ExternalLinkStyled = ({
|
|
children,
|
|
title,
|
|
href,
|
|
...props
|
|
}: ExternalLinkStyledProps) => (
|
|
<Anchor<'a'>
|
|
component="a"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
title={title}
|
|
href={href}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</Anchor>
|
|
);
|