chore(FormGroup): add labelWrapper

This commit is contained in:
Benjamin Canac
2022-01-05 12:50:43 +01:00
parent c183df8a17
commit 4aea61a4a7
2 changed files with 6 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ const button = {
const formGroup = {
wrapper: '',
label: 'block text-sm font-medium u-text-gray-700',
labelWrapper: 'flex content-center justify-between',
container: 'mt-1 relative',
required: 'text-red-400',
description: 'text-sm leading-5 u-text-gray-500',

View File

@@ -1,7 +1,7 @@
<template>
<div :class="wrapperClass">
<slot name="label">
<div class="flex content-center justify-between">
<div :class="labelWrapperClass">
<label
v-if="label"
:for="name"
@@ -69,6 +69,10 @@ export default {
type: String,
default: () => $ui.formGroup.label
},
labelWrapperClass: {
type: String,
default: () => $ui.formGroup.labelWrapper
},
descriptionClass: {
type: String,
default: () => $ui.formGroup.description