18
common/resources/client/ui/buttons/external-link.tsx
Executable file
18
common/resources/client/ui/buttons/external-link.tsx
Executable file
@@ -0,0 +1,18 @@
|
||||
import {ComponentPropsWithRef} from 'react';
|
||||
|
||||
export const LinkStyle =
|
||||
'text-link hover:underline hover:text-primary-dark focus-visible:ring focus-visible:ring-2 focus-visible:ring-offset-2 outline-none rounded transition-colors';
|
||||
|
||||
interface ExternalLinkProps extends ComponentPropsWithRef<'a'> {}
|
||||
export function ExternalLink({
|
||||
children,
|
||||
className,
|
||||
target = '_blank',
|
||||
...domProps
|
||||
}: ExternalLinkProps) {
|
||||
return (
|
||||
<a className={LinkStyle} target={target} {...domProps}>
|
||||
{children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user