import { CSSProperties, ImgHTMLAttributes } from '../../../node_modules/react';
import { IconProps as PhosphorIconProps } from '@phosphor-icons/react';
import { IconName } from './iconRegistry';
export type IconSize = 'xs' | 'sm' | 'md' | 'lg';
export type IconWeightOption = 'regular' | 'bold' | 'fill' | 'light';
type IconSharedProps = {
/**
* Size of the icon.
* @default 'md'
*/
size?: IconSize | number;
style?: CSSProperties;
className?: string;
};
/** Phosphor registry icon (string `name`). */
export type PhosphorIconComponentProps = Omit & IconSharedProps & {
/** Registry icon key (kebab-case for TypeScript, e.g. `"check-circle"`). */
name: IconName;
/** Mutually exclusive with `name` — use `ExternalIconProps` instead. */
src?: never;
/**
* Weight/style of the icon.
* @default 'regular'
*/
weight?: IconWeightOption;
/** Color of the icon. Defaults to `currentColor`. */
color?: string;
};
/** External image / SVG URL or imported asset module string. */
export type ExternalIconProps = IconSharedProps & Omit, 'src' | 'width' | 'height' | 'color' | 'size'> & {
name?: never;
/**
* Image URL or bundler-imported asset (png, svg, webp, jpg, etc.).
* Renders an `
`; `weight` / `color` do not apply.
*/
src: string;
/**
* Accessible name for the image.
* @default '' (decorative)
*/
alt?: string;
weight?: never;
/** Not applied to `
` sources — use a tinted asset or Phosphor `name` instead. */
color?: never;
};
export type IconProps = PhosphorIconComponentProps | ExternalIconProps;
/**
* True when props resolve to a renderable Phosphor name or external `src`.
* Use before rendering `` from optional `IconProps` slots.
*/
export declare function hasIconSource(props?: IconProps | null): props is IconProps;
export declare const Icon: import('../../../node_modules/react').ForwardRefExoticComponent>;
export {};