From d8770f7c9786c487066b26475194574d3fd01c5f Mon Sep 17 00:00:00 2001 From: Kyzyl-ool Kezhik Date: Fri, 27 Oct 2023 18:05:11 +0200 Subject: [PATCH] feat: adding id prop for HTML component (#183) --- 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, }); };