${title}${icon}`;
}
- if (isHtmlParserLoaded) {
- return (
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Incompatible HTMLElement and SVGSVGElement
-
- );
- }
-
- // @deprecated Usage of `html-react-parser` will be required in the next major version.
- // @TODO: Remove this block in the next major version.
- // @see { @link https://jira.almacareer.tech/browse/DS-1149 }
return (
-
- {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
- {/* @ts-ignore: Incompatible HTMLElement and SVGSVGElement */}
-
-
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore: Incompatible HTMLElement and SVGSVGElement
+
);
};
diff --git a/packages/web-react/src/components/Icon/README.md b/packages/web-react/src/components/Icon/README.md
index 5b3f1dfae4..1886d141b5 100644
--- a/packages/web-react/src/components/Icon/README.md
+++ b/packages/web-react/src/components/Icon/README.md
@@ -7,19 +7,19 @@ Icons are graphical metaphors or symbols that can be used to complement existing
To use this component in your project you need to run the following command using [npm][npm]:
```bash
-npm install -S @lmc-eu/spirit-icons html-react-parser
+npm install -S @lmc-eu/spirit-icons
```
If you prefer [Yarn][yarn], use the following command instead:
```bash
-yarn add @lmc-eu/spirit-icons html-react-parser
+yarn add @lmc-eu/spirit-icons
```
### 📦 Dependencies
-Both packages are required as **peer dependency** to keep package size as low as possible.
-So they will not be automatically installed with `@lmc-eu/spirit-web-react`.
+`@lmc-eu/spirit-icons` is required as a **peer dependency** to keep package size as low as possible.
+So it will not be automatically installed with `@lmc-eu/spirit-web-react`.
- [`@lmc-eu/spirit-icons`][icons-package] - Spirit Icons package
- [`html-react-parser`][html-react-parser-package] - HTML to React parser (avoid usage of `dangerouslySetInnerHTML` on the server side)
diff --git a/packages/web-react/src/utils/htmlParser.ts b/packages/web-react/src/utils/htmlParser.ts
deleted file mode 100644
index b85c6fa6f7..0000000000
--- a/packages/web-react/src/utils/htmlParser.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import warning from '../common/utilities/warning';
-
-let parse = null;
-
-import('html-react-parser')
- .then((htmlReactParser) => {
- parse = htmlReactParser;
- })
- .catch(() =>
- warning(
- false,
- '`html-react-parser` is not installed and will be required in the next major version. Please install, missing peer dependency.',
- ),
- );
-
-export const htmlParser = typeof parse === 'function' ? parse : null;