import { clsx } from "clsx"; import { FC, PropsWithChildren } from "react"; type ButtonTheme = "default" | "primary" | "alert"; export type ButtonProps = PropsWithChildren<{ onClick?: () => void; wide?: boolean; // stretch the button horizontally theme?: ButtonTheme; disabled?: boolean; height?: string; size?: "small" | "medium"; // We default to type="button", to avoid form-related bugs. // In HTML standard, there's also "reset", but it's rarely useful. type?: "submit" | "button"; // More precise control for the button's layout. Disables padding and flexbox mode. noLayout?: boolean; }>; // For internal use only, for now (see ButtonWithDropdown). export const ButtonGroup: FC = ({ children }) => { return
{children}
; }; export const Button: FC = ({ onClick, wide, theme = "default", disabled, size = "medium", type = "button", noLayout = false, children, }) => { return ( ); };