UNPKG

@iobroker/adapter-react-v5

Version:

React components to develop ioBroker interfaces with react.

34 lines (33 loc) 1.14 kB
import React, { type ReactEventHandler } from 'react'; /** * Get icon by object type (state, channel, device, ...). * * @param obj Object */ export declare function getSystemIcon(obj: ioBroker.Object | null): React.JSX.Element | null; /** * Get icon from the object. * * @param obj Object * @param imagePrefix Prefix for image */ export declare function getSelectIdIcon(obj: ioBroker.Object | null, imagePrefix?: string): string | null; export interface IconProps { /** URL, UTF-8 character, or svg code (data:image/svg...) */ src: string | React.JSX.Element | null | undefined; /** Class name */ className?: string; /** Style for image */ style?: React.CSSProperties; /** Styles for mui */ sx?: Record<string, any>; /** Tooltip */ title?: string; /** Styles for utf-8 characters */ styleUTF8?: React.CSSProperties; /** On error handler */ onError?: ReactEventHandler<HTMLImageElement>; /** Alternative text for image */ alt?: string; } export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLSpanElement | HTMLImageElement>>;