Files
test/src/components/ui/text-link.tsx

29 lines
647 B
TypeScript

import { cn } from "@/lib/utils";
import type { FC, ReactNode } from "react";
interface TextLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
children?: ReactNode;
className?: string;
disabled?: boolean;
}
export const TextLink: FC<TextLinkProps> = ({
children,
className,
disabled = false,
...props
}) => {
return (
<a
data-disabled={disabled}
className={cn(
"text-feedback-info-900 data-[disabled=true]:opacity-50 font-[500] data-[disabled=false]:cursor-pointer data-[disabled=false]:hover:border-b-[2px] w-fit transition-all duration-75",
className,
)}
{...props}
>
{children}
</a>
);
};