Files
Brandon Thomas 82effe0ce9 add nx for javascript monorepos and move 3d under it (#497)
this required the following:

- downgrading nx react (19 -> 18.2)
- .npmrc credentials for fontawesome
- installing a lot of nx plugins from the vanilla config
- removing kalidokit vendored code and all references to it
2025-04-10 23:15:23 -04:00

35 lines
903 B
TypeScript

import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { Button } from "~/components";
import { twMerge } from "tailwind-merge";
interface ToggleButtonProps {
isActive: boolean;
icon?: IconDefinition;
activeIcon?: IconDefinition;
onClick: () => void;
className?: string;
}
export const ToggleButton = ({
isActive,
icon,
activeIcon,
onClick,
className,
}: ToggleButtonProps) => {
return (
<Button
className={twMerge(
"flex h-9 w-9 items-center border-2 border-transparent text-sm text-white backdrop-blur-lg transition-all",
isActive
? "border-white/20 bg-brand-primary/40 hover:border-white/30 hover:bg-brand-primary/40"
: "bg-[#5F5F68]/60 hover:bg-[#5F5F68]/90",
className,
)}
variant="secondary"
icon={isActive && activeIcon ? activeIcon : icon}
onClick={onClick}
/>
);
};