import type { ReactElement, HTMLAttributes, Ref } from "react"; import type SlIconElement from "@shoelace-style/shoelace/dist/components/icon/icon.js"; import { SlLoadEvent, SlErrorEvent } from "../events"; export type { SlIconElement }; export type SlIconLoadEvent = SlLoadEvent; export type SlIconErrorEvent = SlErrorEvent; export interface SlIconProps extends HTMLAttributes { ref?: Ref; /** * The name of the icon to draw. Available names depend on the icon library being used. */ name?: string | undefined; /** * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and * can result in XSS attacks. */ src?: string | undefined; /** * An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and * ignored by assistive devices. */ label?: string; /** * The name of a registered custom icon library. */ library?: string; /** * Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit. */ onSlLoad?: (event: SlIconLoadEvent) => void; /** * Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit. */ onSlLoadCapture?: (event: SlIconLoadEvent) => void; /** * Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit. */ onSlError?: (event: SlIconErrorEvent) => void; /** * Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit. */ onSlErrorCapture?: (event: SlIconErrorEvent) => void; } /** * Icons are symbols that can be used to represent various options within an application. */ export default function SlIcon( props: SlIconProps, ): ReactElement;