@iobroker/adapter-react-v5 4.10.0 → 4.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/Icon.d.ts +7 -0
- package/Components/Icon.js +1 -1
- package/README.md +1 -1
- package/package.json +1 -1
package/Components/Icon.d.ts
CHANGED
|
@@ -2,11 +2,18 @@ import React from 'react';
|
|
|
2
2
|
export declare function getSystemIcon(obj: ioBroker.Object | null): React.JSX.Element | null;
|
|
3
3
|
export declare function getSelectIdIcon(obj: ioBroker.Object | null, imagePrefix?: string): string | null;
|
|
4
4
|
interface IconProps {
|
|
5
|
+
/** URL, UTF-8 character, or svg code (data:image/svg...) */
|
|
5
6
|
src: string | React.JSX.Element | null | undefined;
|
|
7
|
+
/** Class name */
|
|
6
8
|
className?: string;
|
|
9
|
+
/** Style for image */
|
|
7
10
|
style?: React.CSSProperties;
|
|
11
|
+
/** Tooltip */
|
|
8
12
|
title?: string;
|
|
13
|
+
/** Styles for utf-8 characters */
|
|
9
14
|
styleUTF8?: React.CSSProperties;
|
|
15
|
+
/** Alternative text for image */
|
|
16
|
+
alt?: string;
|
|
10
17
|
}
|
|
11
18
|
declare const Icon: (props: IconProps) => React.JSX.Element;
|
|
12
19
|
export default Icon;
|
package/Components/Icon.js
CHANGED
|
@@ -107,7 +107,7 @@ const Icon = (props) => {
|
|
|
107
107
|
if (props.src.startsWith('data:image/svg')) {
|
|
108
108
|
return react_1.default.createElement(react_inlinesvg_1.default, { title: props.title || undefined, src: props.src, className: Utils_1.default.clsx(props.className, 'iconOwn'), width: ((_a = props.style) === null || _a === void 0 ? void 0 : _a.width) || 28, height: ((_b = props.style) === null || _b === void 0 ? void 0 : _b.height) || ((_c = props.style) === null || _c === void 0 ? void 0 : _c.width) || 28, style: props.style || {} });
|
|
109
109
|
}
|
|
110
|
-
return react_1.default.createElement("img", { title: props.title || undefined, style: props.style || {}, className: Utils_1.default.clsx(props.className, 'iconOwn'), src: props.src, alt:
|
|
110
|
+
return react_1.default.createElement("img", { title: props.title || undefined, style: props.style || {}, className: Utils_1.default.clsx(props.className, 'iconOwn'), src: props.src, alt: props.alt || undefined });
|
|
111
111
|
}
|
|
112
112
|
return props.src;
|
|
113
113
|
}
|
package/README.md
CHANGED