From 385f610f237d11734eaaccbe6acfebcf85c2a8a9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 8 Sep 2022 11:53:46 +0200 Subject: [PATCH] Add a Svelte Html component --- code/renderers/react/template/components/Html.jsx | 1 + code/renderers/svelte/template/components/Html.svelte | 8 ++++++++ code/renderers/svelte/template/components/index.js | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 code/renderers/svelte/template/components/Html.svelte diff --git a/code/renderers/react/template/components/Html.jsx b/code/renderers/react/template/components/Html.jsx index c7fa14f3e58..974118ca564 100644 --- a/code/renderers/react/template/components/Html.jsx +++ b/code/renderers/react/template/components/Html.jsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +// eslint-disable-next-line react/no-danger export const Html = ({ contents }) =>
; Html.propTypes = { diff --git a/code/renderers/svelte/template/components/Html.svelte b/code/renderers/svelte/template/components/Html.svelte new file mode 100644 index 00000000000..b76ec4de7f1 --- /dev/null +++ b/code/renderers/svelte/template/components/Html.svelte @@ -0,0 +1,8 @@ + + +
{@html contents}>
diff --git a/code/renderers/svelte/template/components/index.js b/code/renderers/svelte/template/components/index.js index d2e5d492126..9f7c09bcf79 100644 --- a/code/renderers/svelte/template/components/index.js +++ b/code/renderers/svelte/template/components/index.js @@ -1,5 +1,6 @@ import globalThis from 'global'; import Button from './Button.svelte'; +import Html from './Html.svelte'; -globalThis.Components = { Button }; +globalThis.Components = { Button, Html };