UNPKG

@spark-web/button

Version:

--- title: Button storybookPath: forms-buttons-button--default isExperimentalPackage: true ---

32 lines (31 loc) 1.61 kB
import type { CommonButtonProps, NativeButtonProps } from "./types.js"; export type ButtonProps = CommonButtonProps & { /** * Identifies the element (or elements) whose contents or presence * are controlled by the current element. */ 'aria-controls'?: NativeButtonProps['aria-controls']; /** Identifies the element (or elements) that describes the object. */ 'aria-describedby'?: NativeButtonProps['aria-describedby']; /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ 'aria-expanded'?: NativeButtonProps['aria-expanded']; /** Defines a string value that labels the current element. */ 'aria-label'?: NativeButtonProps['aria-label']; /** When true, prevents onClick from firing. */ disabled?: boolean; /** When true, the button will display a loading spinner. */ loading?: boolean; /** Function to be fired following a click event of the button. Only applicable for Button. */ onClick?: NativeButtonProps['onClick']; /** The size of the button. */ size?: CommonButtonProps['size']; /** Provide an alternate type if the button is within a form. */ type?: 'button' | 'submit' | 'reset'; /** When true, the button will be filled depending on the variant. */ filled?: boolean; }; /** * Buttons are used to initialize an action, their label should express what * action will occur when the user interacts with it. */ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;