1
0
Fork 0
mirror of synced 2024-07-06 15:00:49 +12:00

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,
},