From b70de4938f751db27bb95954d55cea97c7a96221 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 17 Nov 2020 14:06:43 +0000 Subject: [PATCH] Fix screen slot placeholder component display --- .../AppPreview/CurrentItemPreview.svelte | 11 +------- .../AppPreview/iframeTemplate.js | 4 +-- packages/standard-components/src/Text.svelte | 28 ++++++++++--------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte index 77b0e6b665..fb3e28ded5 100644 --- a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte +++ b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte @@ -65,10 +65,7 @@ _id: "90a52cd0-f215-46c1-b29b-e28f9e7edf72", _component: "@budibase/standard-components/heading", _styles: { - normal: { - width: "500px", - padding: "8px", - }, + normal: {}, hover: {}, active: {}, selected: {}, @@ -86,10 +83,7 @@ _component: "@budibase/standard-components/text", _styles: { normal: { - "max-width": "", "text-align": "left", - width: "500px", - padding: "8px", }, hover: {}, active: {}, @@ -107,10 +101,7 @@ _component: "@budibase/standard-components/text", _styles: { normal: { - "max-width": "", "text-align": "left", - width: "500px", - padding: "8px", }, hover: {}, active: {}, diff --git a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js index 7bfa9ddab9..47ee1319c8 100644 --- a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js +++ b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js @@ -11,7 +11,7 @@ export default ` *, *:before, *:after { box-sizing: border-box; } - .container-screenslot-placeholder { + [data-bb-id="container-screenslot-placeholder"] { display: flex; align-items: center; justify-content: center; @@ -23,7 +23,7 @@ export default ` background-color: rgba(0, 0, 0, 0.05); flex: 1 1 auto; } - .container-screenslot-placeholder span { + [data-bb-id="container-screenslot-placeholder"] span { display: block; margin-bottom: 10px; } diff --git a/packages/standard-components/src/Text.svelte b/packages/standard-components/src/Text.svelte index d1b5c4a567..3da98b13a0 100644 --- a/packages/standard-components/src/Text.svelte +++ b/packages/standard-components/src/Text.svelte @@ -1,35 +1,37 @@ {#if isTag('none')} - {text} + {text} {:else if isTag('bold')} - {text} + {text} {:else if isTag('strong')} - {text} + {text} {:else if isTag('italic')} - {text} + {text} {:else if isTag('emphasis')} - {text} + {text} {:else if isTag('mark')} - {text} + {text} {:else if isTag('small')} - {text} + {text} {:else if isTag('del')} - {text} + {text} {:else if isTag('ins')} - {text} + {text} {:else if isTag('sub')} - {text} + {text} {:else if isTag('sup')} - {text} -{:else}{text}{/if} + {text} +{:else}{text}{/if}