import { CSSProperties, MouseEvent } from 'react'; import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js'; export type AnimatedIconSlots = 'root' | 'icon'; export interface AnimatedIconProps extends HtmlProps { /** The icon to display. Changing this crossfades from whatever icon was showing before. */ icon: IconDefinition; /** Transition duration in ms (default `200`) */ duration?: number; /** * Swaps icons by rotating the whole icon a further 360° each change and crossfading, the * style originally built for `Fab`'s open/close icon, instead of the default of each icon * individually rotating in from the opposite direction. Reads as more energetic/"spinny" — * good for a toggle a user taps repeatedly (open/close, play/pause), less so for something * that swaps only once in a while (default `false`). */ spin?: boolean; className?: string; style?: CSSProperties; onClick?: (event: MouseEvent) => void; onMouseEnter?: (event: MouseEvent) => void; onMouseLeave?: (event: MouseEvent) => void; classNames?: SlotClassNames; styles?: SlotStyles; }