Update CSS conditional UI
This commit is contained in:
parent
6c6dd76c4c
commit
075611b2fa
|
@ -56,7 +56,11 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
let dragDisabled = true
|
let dragDisabled = true
|
||||||
$: settings = getComponentSettings($selectedComponent?._component)
|
$: settings = getComponentSettings($selectedComponent?._component)?.concat({
|
||||||
|
label: "CSS",
|
||||||
|
key: "css",
|
||||||
|
type: "text",
|
||||||
|
})
|
||||||
$: settingOptions = settings.map(setting => ({
|
$: settingOptions = settings.map(setting => ({
|
||||||
label: setting.label,
|
label: setting.label,
|
||||||
value: setting.key,
|
value: setting.key,
|
||||||
|
|
|
@ -379,6 +379,9 @@
|
||||||
// initial props are up to date. By setting it this way rather than
|
// initial props are up to date. By setting it this way rather than
|
||||||
// setting it on initialSettings directly, we avoid a double render.
|
// setting it on initialSettings directly, we avoid a double render.
|
||||||
cachedSettings[key] = allSettings[key]
|
cachedSettings[key] = allSettings[key]
|
||||||
|
if (key === "css") {
|
||||||
|
instance._styles.custom = cachedSettings[key]
|
||||||
|
}
|
||||||
|
|
||||||
if (ref?.$$set) {
|
if (ref?.$$set) {
|
||||||
// Programmatically set the prop to avoid svelte reactive statements
|
// Programmatically set the prop to avoid svelte reactive statements
|
||||||
|
|
Loading…
Reference in New Issue