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