import { ComponentChildren } from "preact"; import Icon from "./Icon.js"; import "./Button.css"; interface LinkProps { className?: string; href?: string; openExternally?: boolean; children: ComponentChildren; title?: string; onClick?: (e: MouseEvent) => void; } interface ButtonProps extends Omit { href?: string; iconSvg?: string; text: ComponentChildren; openExternally?: boolean; outline?: boolean; } export default function Button({ iconSvg, text, className, outline, ...restProps }: ButtonProps) { return ( {iconSvg && <>{" "}} {text} ) } export function Link({ openExternally, children, ...restProps }: LinkProps) { return ( {children} ) }