import type { ClassValue, HTMLButtonAttributes } from 'svelte/elements'; import { type IconName } from '../icon'; interface Props extends HTMLButtonAttributes { /** The button is disabled. */ disabled?: boolean | undefined; /** The type of the button. */ type?: 'button' | 'submit' | 'reset' | undefined; /** The communicated action type to the user. */ variant?: 'primary' | 'dark' | 'ghost' | 'ghost-outline' | 'danger' | 'outline-danger' | 'success' | 'outline-success' | 'pending' | 'disabled-dark' | undefined; /** The icon shown in the button. */ icon?: IconName | undefined; /** The width of the button. */ width?: 'full' | 'default' | undefined; /** The height of the button. */ height?: 'fixed' | 'default' | undefined; /** The text size of the button. */ textSize?: 'text-sm' | 'text-xs' | undefined; /** Shows progress indicator. Determinate progress is a @TODO */ progress?: 'indeterminate' | number | undefined; /** The native button element, for binding. */ button?: HTMLButtonElement | undefined; /** Extra class names. */ class?: ClassValue; /** The class name of the button progress. */ progressClass?: ClassValue; /** The class name of the button icon. */ iconClass?: ClassValue; /** The class name of the button content. */ contentClass?: ClassValue; } /** * For user triggered actions. * * ```svelte *