UNPKG

react-lightning-design-system

Version:

Salesforce Lightning Design System components built with React

50 lines (49 loc) 1.58 kB
import { FC, ReactNode, ButtonHTMLAttributes, Ref } from 'react'; import { IconCategory } from './Icon'; export type ButtonType = 'neutral' | 'brand' | 'outline-brand' | 'destructive' | 'text-destructive' | 'success' | 'inverse' | 'icon' | 'icon-container' | 'icon-inverse' | 'icon-more' | 'icon-border' | 'icon-border-filled' | 'icon-border-inverse'; declare const ICON_SIZES: readonly ["x-small", "small", "medium", "large"]; declare const ICON_ALIGNS: readonly ["left", "right"]; export type ButtonSize = 'x-small' | 'small' | 'medium' | 'large'; export type ButtonIconSize = (typeof ICON_SIZES)[number]; export type ButtonIconAlign = (typeof ICON_ALIGNS)[number]; export type ButtonIconMoreSize = 'x-small' | 'small' | 'medium' | 'large'; /** * */ export type ButtonIconProps = { className?: string; category?: IconCategory; icon: string; align?: ButtonIconAlign; size?: ButtonIconSize; inverse?: boolean; style?: object; }; /** * */ export declare const ButtonIcon: FC<ButtonIconProps>; /** * */ export type ButtonProps = { label?: ReactNode; alt?: string; type?: ButtonType; size?: ButtonSize; htmlType?: 'button' | 'submit' | 'reset'; selected?: boolean; inverse?: boolean; loading?: boolean; icon?: string; iconSize?: ButtonIconSize; iconAlign?: ButtonIconAlign; iconMore?: string; iconMoreSize?: ButtonIconMoreSize; buttonRef?: Ref<HTMLButtonElement>; } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'>; /** * */ export declare const Button: FC<ButtonProps>; export {};