import type { MouseEventHandler, ReactNode } from "react"; import { Icon, type IconName } from "./icon"; import styles from "./pixel.module.css"; /** A chunky button that sinks into its base when pressed; with href it is a link that looks the part. */ export function PixelButton({ children, href, onClick, variant = "primary", icon }: { children: ReactNode; href?: string; onClick?: MouseEventHandler; variant?: "primary" | "ghost"; icon?: IconName; }) { const content = ( <> {icon ? : null} {children} ); if (href) { return {content}; } return ; }