From 3594f07346a103031221c382590083e190bce9fa Mon Sep 17 00:00:00 2001 From: pngwn Date: Wed, 22 Jan 2020 12:00:20 +0000 Subject: [PATCH] Refactor inputs into components for simpler value bindings. --- .../src/common/Inputs/InputGroup.svelte | 54 +++++++++ .../src/userInterface/LayoutEditor.svelte | 111 ++++++------------ 2 files changed, 87 insertions(+), 78 deletions(-) create mode 100644 packages/builder/src/common/Inputs/InputGroup.svelte diff --git a/packages/builder/src/common/Inputs/InputGroup.svelte b/packages/builder/src/common/Inputs/InputGroup.svelte new file mode 100644 index 0000000000..09ed8298b7 --- /dev/null +++ b/packages/builder/src/common/Inputs/InputGroup.svelte @@ -0,0 +1,54 @@ + + +
+ {#each meta as { placeholder }, i} + + {/each} +
+ + diff --git a/packages/builder/src/userInterface/LayoutEditor.svelte b/packages/builder/src/userInterface/LayoutEditor.svelte index 4132384095..0b26f19d33 100644 --- a/packages/builder/src/userInterface/LayoutEditor.svelte +++ b/packages/builder/src/userInterface/LayoutEditor.svelte @@ -1,4 +1,28 @@ - +

Layout

@@ -8,35 +32,22 @@
Grid Area:
-
- - - - -
+
Column:
-
- - -
+
Row:
-
- - -
+
Gap:
-
- -
+
@@ -45,22 +56,12 @@
Margin:
-
- - - - -
+
Padding:
-
- - - - -
+
@@ -69,9 +70,7 @@
Z-Index:
-
- -
+
@@ -99,6 +98,7 @@ color: #163057; opacity: 0.6; padding-top: 12px; + margin-bottom: 0; } div > div { @@ -113,49 +113,4 @@ grid-template-columns: 70px 1fr; } - .inputs { - display: flex; - justify-content: space-between; - - } - - input { - width: 83px; - font-size: 12px; - font-weight: 700; - color: #163057; - opacity: 0.7; - padding: 5px 10px; - box-sizing: border-box; - - /* margin: 0; */ - } - - input[type=number]::-webkit-inner-spin-button, - input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - margin: 0; -} - - .small > input { - width: 38px; - height: 38px; - display: flex; - justify-content: center; - align-items: center; - text-align: center; - padding: 0; - } - - .small > input::placeholder { - text-align: center; - } - - input, input { - border: 1px solid #DBDBDB; - border-radius: 2px; - outline: none; - }