fix: render wrapper dynamically

This commit is contained in:
Csongor Czezar
2025-12-26 16:49:22 -08:00
parent 4fa21b5f0f
commit b16202e3ea

View File

@@ -1,13 +1,20 @@
<template>
<WidgetLayoutField :widget>
<div class="ml-auto flex items-center gap-2">
<div v-if="currentLabel" class="ml-auto flex items-center gap-2">
<ToggleSwitch
v-model="modelValue"
v-bind="filteredProps"
:aria-label="widget.name"
/>
<span v-if="currentLabel" class="text-sm">{{ currentLabel }}</span>
<span class="text-sm">{{ currentLabel }}</span>
</div>
<ToggleSwitch
v-else
v-model="modelValue"
v-bind="filteredProps"
class="ml-auto block"
:aria-label="widget.name"
/>
</WidgetLayoutField>
</template>