Browse Source

Tidy up builder preview iframe

gh-pages
Andrew Kingston 6 years ago
parent
commit
df37177239
  1. 12
      packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte
  2. 7
      packages/builder/src/components/userInterface/AppPreview/iframeTemplate.html

12
packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte

@ -69,13 +69,11 @@
</script> </script>
<div class="component-container"> <div class="component-container">
{#if $currentAsset} <iframe
<iframe style="height: 100%; width: 100%"
style="height: 100%; width: 100%" title="componentPreview"
title="componentPreview" bind:this={iframe}
bind:this={iframe} srcdoc={iframeTemplate} />
srcdoc={iframeTemplate} />
{/if}
</div> </div>
<style> <style>

7
packages/builder/src/components/userInterface/AppPreview/iframeTemplate.html

@ -1,12 +1,11 @@
<html> <html>
<head> <head>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> <link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono">
<style> <style>
body, html { body, html {
height: 100% !important; height: 100% !important;
font-family: Inter !important; font-family: Inter, sans-serif !important;
margin: 0px !important; margin: 0 !important;
} }
*, *:before, *:after { *, *:before, *:after {
box-sizing: border-box; box-sizing: border-box;
@ -35,8 +34,6 @@
} }
} }
let selectedComponentStyle
// Ignore clicks // Ignore clicks
["click", "mousedown"].forEach(type => { ["click", "mousedown"].forEach(type => {
document.addEventListener(type, function(e) { document.addEventListener(type, function(e) {

Loading…
Cancel
Save