From eca549e04f2d42e000b7152e73f1344e16578286 Mon Sep 17 00:00:00 2001 From: kkmch Date: Fri, 27 Oct 2023 18:03:18 +0200 Subject: [PATCH] feat: adding id prop for HTML component --- src/components/HTML/HTML.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/HTML/HTML.tsx b/src/components/HTML/HTML.tsx index 696ff55a..d728a6c4 100644 --- a/src/components/HTML/HTML.tsx +++ b/src/components/HTML/HTML.tsx @@ -4,9 +4,10 @@ export interface HTMLProps { children?: string; block?: boolean; className?: string; + id?: string; } -export const HTML: React.FC = ({children, block = false, className}) => { +export const HTML: React.FC = ({children, block = false, className, id}) => { if (!children) { return null; } @@ -14,5 +15,6 @@ export const HTML: React.FC = ({children, block = false, className}) return React.createElement(block ? 'div' : 'span', { dangerouslySetInnerHTML: {__html: children}, className, + id, }); };