Merge branch 'master' of github.com:Budibase/budibase

This commit is contained in:
Michael Shanks 2020-06-02 16:18:38 +01:00
commit 451566cc30
3 changed files with 8 additions and 6 deletions

View File

@ -14,7 +14,8 @@
function handleChange(val) {
value = val
onChange(value)
let _value = value !== "auto" ? value + suffix : value
onChange(_value)
}
$: displayValue = suffix && value && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : (value || "")

View File

@ -10,9 +10,10 @@
export let onChange = () => {}
function handleChange(val, idx) {
value.splice(idx, 1, suffix ? val + suffix : val)
value.splice(idx, 1, val !== "auto" ? val + suffix : val)
value = value
let _value = value.map(v => (!v.endsWith(suffix) ? v + suffix : v))
let _value = value.map(v => (!v.endsWith(suffix) && v !== "auto" ? v + suffix : v))
onChange(_value)
}
@ -26,7 +27,7 @@
<div class="inputs-group">
{#each meta as m, i}
<Input
width="32px"
width="37px"
textAlign="center"
placeholder={m.placeholder || ''}
value={!displayValues || displayValues[i] === '0' ? '' : displayValues[i]}

View File

@ -240,7 +240,7 @@ export const typography = [
label: "Weight",
key: "font-weight",
control: OptionSelect,
options: ["normal", "bold", "bolder", "lighter"],
options: ["200", "300", "400", "500", "600", "700", "800", "900"],
},
{
label: "size",
@ -297,7 +297,7 @@ export const typography = [
export const background = [
{
label: "Background",
label: "Color",
key: "background",
control: Input,
},