import { PresentationMode } from '../../types/internal/webComponent.types'; export const webViewId = 'webViewContainer'; export const getHtmlBody = (unitComponent: string, unitComponentProps?: string, presentationMode?: PresentationMode) => { const currentComponent = `<${unitComponent} ${unitComponentProps || ''} }> `; switch (presentationMode) { case PresentationMode.CoverInjectedHeight: return getCoverInjectedHeightBodyScript(currentComponent); case PresentationMode.Inherit: return getInheritParentSizeScript(currentComponent); default: return currentComponent; } }; const getCoverInjectedHeightBodyScript = (currentUnitScript: string) => { return `
${currentUnitScript}
`; }; const getInheritParentSizeScript = (currentUnitScript: string) => { return `
${currentUnitScript}
`; };