@blocklet/pages-kit-block-studio 0.1.8 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -201,11 +201,8 @@ ${content.trim()}`;
201
201
  export function generateComponent(content, _isDev = true) {
202
202
  const htmlContent = content.html;
203
203
  // const { name } = content;
204
- return `import React, { useEffect, useRef } from 'react';
204
+ return `import React, { useEffect, useRef } from '@blocklet/pages-kit/builtin/react';
205
205
 
206
- const htmlContent = \`
207
- ${htmlContent}
208
- \`;
209
206
 
210
207
  export default function HtmlPreview() {
211
208
  const iframeRef = useRef(null);
@@ -233,7 +230,7 @@ export default function HtmlPreview() {
233
230
  style={{ border: 'none', width: '100%', height: '0px', maxHeight: '100vh' }}
234
231
  sandbox="allow-scripts"
235
232
  title="HtmlPreview"
236
- srcDoc={htmlContent}
233
+ srcDoc={${htmlContent}}
237
234
  />
238
235
  );
239
236
  }`;