fix: label aligned with button group

This commit is contained in:
Csongor Czezar
2026-01-06 16:36:05 -08:00
parent f13e35c89b
commit e4f87a96a4
2 changed files with 9 additions and 3 deletions

View File

@@ -88,6 +88,7 @@ const widgetWithStyle = computed(() => ({
...widget, ...widget,
borderStyle: hasLabels.value borderStyle: hasLabels.value
? 'focus-within:ring-0 bg-transparent rounded-none focus-within:outline-none' ? 'focus-within:ring-0 bg-transparent rounded-none focus-within:outline-none'
: undefined : undefined,
labelStyle: hasLabels.value ? 'mb-[-0.5rem]' : undefined
})) }))
</script> </script>

View File

@@ -8,7 +8,9 @@ defineProps<{
widget: Pick< widget: Pick<
SimplifiedWidget<string | number | undefined>, SimplifiedWidget<string | number | undefined>,
'name' | 'label' | 'borderStyle' 'name' | 'label' | 'borderStyle'
> > & {
labelStyle?: string
}
}>() }>()
const hideLayoutField = inject<boolean>('hideLayoutField', false) const hideLayoutField = inject<boolean>('hideLayoutField', false)
@@ -18,7 +20,10 @@ const hideLayoutField = inject<boolean>('hideLayoutField', false)
<div <div
class="grid grid-cols-subgrid min-w-0 justify-between gap-1 text-node-component-slot-text" class="grid grid-cols-subgrid min-w-0 justify-between gap-1 text-node-component-slot-text"
> >
<div v-if="!hideLayoutField" class="truncate content-center-safe"> <div
v-if="!hideLayoutField"
:class="cn('truncate content-center-safe', widget.labelStyle)"
>
<template v-if="widget.name"> <template v-if="widget.name">
{{ widget.label || widget.name }} {{ widget.label || widget.name }}
</template> </template>