mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 18:54:09 +00:00
fix: label aligned with button group
This commit is contained in:
@@ -88,6 +88,7 @@ const widgetWithStyle = computed(() => ({
|
||||
...widget,
|
||||
borderStyle: hasLabels.value
|
||||
? 'focus-within:ring-0 bg-transparent rounded-none focus-within:outline-none'
|
||||
: undefined
|
||||
: undefined,
|
||||
labelStyle: hasLabels.value ? 'mb-[-0.5rem]' : undefined
|
||||
}))
|
||||
</script>
|
||||
|
||||
@@ -8,7 +8,9 @@ defineProps<{
|
||||
widget: Pick<
|
||||
SimplifiedWidget<string | number | undefined>,
|
||||
'name' | 'label' | 'borderStyle'
|
||||
>
|
||||
> & {
|
||||
labelStyle?: string
|
||||
}
|
||||
}>()
|
||||
|
||||
const hideLayoutField = inject<boolean>('hideLayoutField', false)
|
||||
@@ -18,7 +20,10 @@ const hideLayoutField = inject<boolean>('hideLayoutField', false)
|
||||
<div
|
||||
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">
|
||||
{{ widget.label || widget.name }}
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user