better variable naming
This commit is contained in:
parent
0a81d5b6df
commit
b5b526fab2
|
@ -7,9 +7,9 @@
|
||||||
export let propertyName
|
export let propertyName
|
||||||
export let onStyleChanged = () => {}
|
export let onStyleChanged = () => {}
|
||||||
|
|
||||||
let _values = values.map(v => v)
|
let selectedLayoutValues = values.map(v => v)
|
||||||
|
|
||||||
$: onStyleChanged(_values)
|
$: onStyleChanged(selectedLayoutValues)
|
||||||
|
|
||||||
const PROPERTY_OPTIONS = {
|
const PROPERTY_OPTIONS = {
|
||||||
Direction: {
|
Direction: {
|
||||||
|
@ -37,10 +37,10 @@
|
||||||
{#each meta as { placeholder }, i}
|
{#each meta as { placeholder }, i}
|
||||||
{#each propertyChoices as [displayName, [cssPropValue, icon]]}
|
{#each propertyChoices as [displayName, [cssPropValue, icon]]}
|
||||||
<button
|
<button
|
||||||
class:selected={cssPropValue === _values[i]}
|
class:selected={cssPropValue === selectedLayoutValues[i]}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
const newPropertyValue = cssPropValue === _values[i] ? '' : cssPropValue
|
const newPropertyValue = cssPropValue === selectedLayoutValues[i] ? '' : cssPropValue
|
||||||
_values[i] = newPropertyValue
|
selectedLayoutValues[i] = newPropertyValue
|
||||||
}}>
|
}}>
|
||||||
<i class={icon} />
|
<i class={icon} />
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue