@senka-ai/ui
Version:
A modern, type-safe Svelte 5 UI component library with full theme support, accessibility standards, and robust state management patterns
27 lines • 1.22 kB
TypeScript
import type { BaseProps, IconComponent, InteractiveHandlers } from '../../type/component';
/**
* IconButton component props interface
* A button that displays only an icon, optimized for accessibility and common UI patterns
*/
interface Props extends BaseProps, IconComponent, InteractiveHandlers {
/** Accessibility label (required) */
'aria-label': string;
/** Button variant @default 'ghost' */
variant?: 'ghost' | 'outlined' | 'filled';
/** Semantic color @default 'default' */
color?: 'default' | 'neutral' | 'success' | 'warning' | 'error';
/** Button size @default 'medium' */
size?: 'small' | 'medium' | 'large';
/** Whether the button is in a loading state @default false */
loading?: boolean;
/** HTML button type attribute @default 'button' */
type?: 'button' | 'submit' | 'reset';
/** Icon to display (required) */
icon: IconComponent['leftIcon'];
/** Size of the icon in pixels (auto-sized based on button size if not provided) */
iconSize?: number;
}
declare const IconButton: import("svelte").Component<Props, {}, "">;
type IconButton = ReturnType<typeof IconButton>;
export default IconButton;
//# sourceMappingURL=IconButton.svelte.d.ts.map