@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
56 lines • 1.97 kB
TypeScript
import type { PartialElement } from '@furystack/shades';
import type { Palette } from '../../services/theme-provider-service.js';
import type { IconDefinition } from './icon-types.js';
export type IconProps = PartialElement<HTMLElement> & {
/** The icon definition to render */
icon: IconDefinition;
/**
* The size of the icon.
* - `'small'`: 16px
* - `'medium'`: 24px
* - `'large'`: 32px
* - `number`: custom size in pixels
* @default 'medium'
*/
size?: 'small' | 'medium' | 'large' | number;
/**
* The palette color for the icon.
* When not provided, the icon uses `currentColor` (inherits from parent text color).
*/
color?: keyof Palette;
/**
* Accessible label for the icon.
* When provided, sets `aria-label` on the element.
* When omitted, sets `aria-hidden="true"` to hide the decorative icon from assistive technologies.
*/
ariaLabel?: string;
};
export declare const Icon: (props: Omit<Partial<HTMLElement>, "style"> & {
style?: Partial<CSSStyleDeclaration>;
} & {
ref?: import("@furystack/shades").RefObject<Element>;
} & {
/** The icon definition to render */
icon: IconDefinition;
/**
* The size of the icon.
* - `'small'`: 16px
* - `'medium'`: 24px
* - `'large'`: 32px
* - `number`: custom size in pixels
* @default 'medium'
*/
size?: "small" | "medium" | "large" | number;
/**
* The palette color for the icon.
* When not provided, the icon uses `currentColor` (inherits from parent text color).
*/
color?: keyof Palette;
/**
* Accessible label for the icon.
* When provided, sets `aria-label` on the element.
* When omitted, sets `aria-hidden="true"` to hide the decorative icon from assistive technologies.
*/
ariaLabel?: string;
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
//# sourceMappingURL=icon.d.ts.map