// // Copyright 2022 DXOS.org // import { Primitive } from '@radix-ui/react-primitive'; import { Slot } from '@radix-ui/react-slot'; import React, { type ComponentPropsWithRef, forwardRef } from 'react'; import { useThemeContext } from '../../hooks'; import { type ThemedClassName } from '../../util'; export type LinkProps = ThemedClassName> & Partial<{ asChild: boolean; variant: 'accent' | 'neutral'; }>; export const Link = forwardRef( ({ classNames, asChild, variant, target = '_blank', rel = 'noreferrer', ...props }, forwardedRef) => { const { tx } = useThemeContext(); const Comp = asChild ? Slot : Primitive.a; return ( ); }, );