Browse Source

Bug fixes and tidyup

pull/292/head
Conor_Mack 6 years ago
parent
commit
2c228fee81
  1. 5
      packages/builder/src/components/common/Input.svelte
  2. 2
      packages/builder/src/components/common/Inputs/InputGroup.svelte
  3. 10
      packages/builder/src/components/userInterface/temporaryPanelStructure.js

5
packages/builder/src/components/common/Input.svelte

@ -11,11 +11,10 @@
let centerPlaceholder = textAlign === "center"
let style = buildStyle({ width, textAlign })
function handleChange(val) {
value = val
let _value = suffix ? value + suffix : value
onChange(_value)
onChange(value)
}
$: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value

2
packages/builder/src/components/common/Inputs/InputGroup.svelte

@ -30,7 +30,7 @@
textAlign="center"
placeholder={m.placeholder || ''}
value={!displayValues || displayValues[i] === '0' ? '' : displayValues[i]}
on:change={e => handleChange(e.target.value || 0, i)} />
onChange={value => handleChange(value || 0, i)} />
{/each}
</div>
</div>

10
packages/builder/src/components/userInterface/temporaryPanelStructure.js

@ -236,27 +236,27 @@ export default {
label: "Heading",
key: "heading",
control: Input,
placeholder: "text",
placeholder: "text",
},
{
label: "Subheading",
key: "subheading",
control: Input,
placeholder: "text",
placeholder: "text",
},
{
label: "Content",
key: "content",
control: Input,
placeholder: "text"
placeholder: "text",
},
{
label: "Image",
key: "imageUrl",
control: Input,
placeholder: "src"
placeholder: "src",
},
]
],
},
},
{

Loading…
Cancel
Save