import type { PropsWithChildren } from 'preact/compat';
export interface LinkButtonProps {
"class"?: string
type?: "link"
href: string
external?: boolean
}
export interface FormButtonProps {
"class"?: string
type: HTMLButtonElement["type"]
href?: null
external?: null
}
export type ButtonProps = LinkButtonProps|FormButtonProps
export function Button({"class": className, type, href, external, children}: ButtonProps & PropsWithChildren) {
if (href) {
return
{children}
} else {
return
}
}