adwaita-web
Version:
A GTK inspired toolkit designed to build awesome web apps
65 lines (64 loc) • 2.64 kB
TypeScript
import React from "react";
import type { AdwaitaIcon } from "../icons";
import type { ExtendElementProps } from "../utils/extendElementProp";
export declare type ButtonProps = ExtendElementProps<"button", {
/** Class names that will be added to the button's element. */
className?: string;
/** Size of the button. */
size?: "mini" | "small" | "medium" | "large" | "huge" | "mega";
/** Icon that will be displayed to the left of the button label. */
icon?: AdwaitaIcon;
/** HTML button type. */
type?: "button" | "submit" | "reset";
/** Shows a spinner and disables the button. */
loading?: boolean;
/** Round style button. */
circular?: boolean;
/** Flat style button. */
flat?: boolean;
/** Link style button. */
link?: boolean;
/** Primary style button. */
primary?: boolean;
/** Danger style button. */
danger?: boolean;
/** Active state. */
active?: boolean;
/** Hover state. */
hover?: boolean;
/** Button containing text. */
text?: boolean;
/** Button containing an image only. */
image?: boolean;
}>;
/** A simple button that allows user to take actions and interact with the app. */
export declare const Button: React.ForwardRefExoticComponent<{
/** Class names that will be added to the button's element. */
className?: string | undefined;
/** Size of the button. */
size?: "small" | "mini" | "medium" | "large" | "huge" | "mega" | undefined;
/** Icon that will be displayed to the left of the button label. */
icon?: AdwaitaIcon | undefined;
/** HTML button type. */
type?: "button" | "submit" | "reset" | undefined;
/** Shows a spinner and disables the button. */
loading?: boolean | undefined;
/** Round style button. */
circular?: boolean | undefined;
/** Flat style button. */
flat?: boolean | undefined;
/** Link style button. */
link?: boolean | undefined;
/** Primary style button. */
primary?: boolean | undefined;
/** Danger style button. */
danger?: boolean | undefined;
/** Active state. */
active?: boolean | undefined;
/** Hover state. */
hover?: boolean | undefined;
/** Button containing text. */
text?: boolean | undefined;
/** Button containing an image only. */
image?: boolean | undefined;
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "link" | "image" | "text" | "ref" | "className" | "type" | "size" | "icon" | "loading" | "circular" | "flat" | "primary" | "danger" | "active" | "hover"> & React.RefAttributes<HTMLButtonElement>>;