import { Link } from "@remix-run/react"; import type { LinkProps } from "@remix-run/react"; import clsx from "clsx"; import * as React from "react"; export interface ButtonProps extends React.ButtonHTMLAttributes { variant?: | "success" | "outlined" | "outlined-success" | "destructive" | "minimal" | "minimal-success" | "minimal-destructive"; tiny?: boolean; loading?: boolean; loadingText?: string; icon?: JSX.Element; "data-cy"?: string; } export function Button(props: ButtonProps) { const { variant, loading, children, loadingText, tiny, className, icon, type = "button", ...rest } = props; return ( ); } type LinkButtonProps = Pick< ButtonProps, "variant" | "children" | "className" | "tiny" > & Pick & { "data-cy"?: string } & { isExternal?: boolean; }; export function LinkButton({ variant, children, tiny, className, to, prefetch, isExternal, "data-cy": testId, }: LinkButtonProps) { if (isExternal) { return ( {children} ); } return ( {children} ); }