import { uiPackageName, uiVersion } from '@/config/site'; export const generateIframeContent = ({ html, wrapper, plugins = [], backgroundColor = '', }) => { const pluginsHtml = plugins .map((plugin) => { return ``; }) .join('\n'); html = ( html || 'ButtonPrimary buttonDanger button' ).replace(/href="#"/g, 'href="javascript:void(0)"'); const code = ` ${pluginsHtml}
${wrapper ? `
${html}
` : html}
`; return code.replace(/\t+/g, ' ').replace(/\s+/g, ' '); };