mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
feat: update default layout
This commit is contained in:
28
inertia/components/common/links/external_link_styled.tsx
Normal file
28
inertia/components/common/links/external_link_styled.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
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>
|
||||
);
|
||||
Reference in New Issue
Block a user