From c0d7278827870d30a7a6ae27343eade13811454d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 7 Aug 2025 22:00:37 +0300 Subject: [PATCH] refactor(react/dialogs): deduplicate raw HTML component --- apps/client/src/widgets/react/RawHtml.tsx | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/client/src/widgets/react/RawHtml.tsx b/apps/client/src/widgets/react/RawHtml.tsx index 2b05676dd..ec208fac1 100644 --- a/apps/client/src/widgets/react/RawHtml.tsx +++ b/apps/client/src/widgets/react/RawHtml.tsx @@ -8,20 +8,20 @@ interface RawHtmlProps { style?: CSSProperties; } -export default function RawHtml({ className, html, style }: RawHtmlProps) { - return ; +export default function RawHtml(props: RawHtmlProps) { + return ; } -export function RawHtmlBlock({ className, html, style }: RawHtmlProps) { - return
+export function RawHtmlBlock(props: RawHtmlProps) { + return
+} + +function getProps({ className, html, style }: RawHtmlProps) { + return { + className: className, + dangerouslySetInnerHTML: getHtml(html), + style + } } function getHtml(html: string | HTMLElement | JQuery) {