UNPKG

liber-salti

Version:

Saltí - Liber Design System

46 lines (45 loc) 1.18 kB
/// <reference types="react" /> import { IconName } from '../Icon/Icon.types'; export interface IconButtonProps { /** * The color of the button */ color?: 'primary' | 'default' | 'inherit'; /** * The name of the Icon to go inside the button */ iconName: IconName; /** * The size of the icon inside the button. * Will be forced to 'large' if size='large'. */ iconSize?: 'medium' | 'large'; /** * The size of the button */ size?: 'small' | 'medium' | 'large'; /** * Action to be triggered on click */ onClick?: React.MouseEventHandler<HTMLButtonElement> & (() => void); /** * Action when mouse enters component */ onMouseEnter?: () => void; /** * Action when mouse leaves component */ onMouseLeave?: () => void; /** * Disable button for avoiding actions on click */ disabled?: boolean; /** * Enables dark mode for the component */ darkMode?: boolean; /** * If `true` the icon button will show a spinner and disable click listeners */ loading?: boolean; }