import clsx from "clsx"; import Link from "next/link"; import { MouseEventHandler, ReactNode } from "react"; interface Props { className?: string; type?: "button" | "submit" | "reset" | undefined; to?: string; target?: undefined | "_blank"; disabled?: boolean; destructive?: boolean; children: ReactNode; onClick?: MouseEventHandler; isLoading?: boolean; prefetch?: "intent" | "render" | "none"; } export function ButtonSecondary({ className = "", type = "button", onClick, disabled, destructive, to, target, children, isLoading, prefetch }: Props) { return ( {(() => { if (!to || disabled) { return ( ); } else { return ( {children} ); } })()} ); }