mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix(FormField): missing conditions to apply container classes (#2631)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -96,7 +96,7 @@ provide(formFieldInjectionKey, computed(() => ({
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div :class="[label && ui.container({ class: props.ui?.container })]">
|
||||
<div :class="[(label || !!slots.label || description || !!slots.description) && ui.container({ class: props.ui?.container })]">
|
||||
<slot :error="error" />
|
||||
|
||||
<p v-if="(typeof error === 'string' && error) || !!slots.error" :class="ui.error({ class: props.ui?.error })">
|
||||
|
||||
@@ -30,7 +30,7 @@ exports[`FormField > renders with description slot correctly 1`] = `
|
||||
<!--v-if-->
|
||||
<p class="text-[var(--ui-text-muted)]">Description slot</p>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mt-1 relative">
|
||||
<!--v-if-->
|
||||
</div>
|
||||
</div>"
|
||||
@@ -130,7 +130,7 @@ exports[`FormField > renders with label slot correctly 1`] = `
|
||||
</div>
|
||||
<!--v-if-->
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mt-1 relative">
|
||||
<!--v-if-->
|
||||
</div>
|
||||
</div>"
|
||||
|
||||
@@ -30,7 +30,7 @@ exports[`FormField > renders with description slot correctly 1`] = `
|
||||
<!--v-if-->
|
||||
<p class="text-[var(--ui-text-muted)]">Description slot</p>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mt-1 relative">
|
||||
<!--v-if-->
|
||||
</div>
|
||||
</div>"
|
||||
@@ -130,7 +130,7 @@ exports[`FormField > renders with label slot correctly 1`] = `
|
||||
</div>
|
||||
<!--v-if-->
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="mt-1 relative">
|
||||
<!--v-if-->
|
||||
</div>
|
||||
</div>"
|
||||
|
||||
Reference in New Issue
Block a user