@spark-web/button
Version:
--- title: Button storybookPath: forms-buttons-button--default isExperimentalPackage: true ---
29 lines (28 loc) • 1.44 kB
TypeScript
/// <reference types="react" />
import type { CommonButtonProps, NativeButtonProps } from './types';
export declare 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'];
/** 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';
};
/**
* 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>>;