@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.
@@ -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;
@@ -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
@@ -670,7 +670,7 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
670
670
  -->
671
671
 
672
672
  ## Changelog
673
- ### 4.10.0 (2024-03-11)
673
+ ### 4.10.1 (2024-03-11)
674
674
  * (bluefox) Migrated some components to typescript
675
675
 
676
676
  ### 4.9.11 (2024-03-08)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "React classes to develop admin interfaces for ioBroker with react.",
5
5
  "author": {
6
6
  "name": "Denis Haev (bluefox)",