UNPKG

@furystack/shades-common-components

Version:

Common UI components for FuryStack Shades

56 lines 2.19 kB
import type { PartialElement } from '@furystack/shades'; import type { Palette } from '../services/theme-provider-service.js'; import type { ComponentSize } from './component-size.js'; export type ButtonProps = PartialElement<HTMLButtonElement> & { /** * The visual variant of the button. * - 'contained': solid background color * - 'outlined': border with transparent background * - 'text': no background or border (default behavior) */ variant?: 'contained' | 'outlined' | 'text'; /** The palette color for the button */ color?: keyof Palette; /** * The size of the button. * @default 'medium' */ size?: ComponentSize; /** When true, applies the error palette color regardless of the `color` prop */ danger?: boolean; /** When true, shows a loading spinner and disables the button */ loading?: boolean; /** An element rendered before the button label */ startIcon?: JSX.Element; /** An element rendered after the button label */ endIcon?: JSX.Element; }; export declare const Button: (props: Omit<Partial<HTMLButtonElement>, "style"> & { style?: Partial<CSSStyleDeclaration>; } & { ref?: import("@furystack/shades").RefObject<Element>; } & { /** * The visual variant of the button. * - 'contained': solid background color * - 'outlined': border with transparent background * - 'text': no background or border (default behavior) */ variant?: "contained" | "outlined" | "text"; /** The palette color for the button */ color?: keyof Palette; /** * The size of the button. * @default 'medium' */ size?: ComponentSize; /** When true, applies the error palette color regardless of the `color` prop */ danger?: boolean; /** When true, shows a loading spinner and disables the button */ loading?: boolean; /** An element rendered before the button label */ startIcon?: JSX.Element; /** An element rendered after the button label */ endIcon?: JSX.Element; } & Omit<Partial<HTMLElement>, "style">, children?: import("@furystack/shades").ChildrenList) => JSX.Element; //# sourceMappingURL=button.d.ts.map