fix(components): move remaining classes to config (#1039)

This commit is contained in:
Benjamin Canac
2023-11-30 16:31:48 +01:00
committed by GitHub
parent 5718dfd69a
commit e408eabd8b
44 changed files with 196 additions and 117 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div :class="ui.wrapper">
<div class="flex items-center h-5">
<div :class="ui.container">
<input
:id="inputId"
v-model="toggle"
@@ -11,13 +11,12 @@
:checked="checked"
:indeterminate="indeterminate"
type="checkbox"
class="form-checkbox"
:class="inputClass"
v-bind="attrs"
@change="onChange"
>
</div>
<div v-if="label || $slots.label" class="ms-3 flex flex-col">
<div v-if="label || $slots.label" :class="ui.inner">
<label :for="inputId" :class="ui.label">
<slot name="label">{{ label }}</slot>
<span v-if="required" :class="ui.required">*</span>
@@ -130,6 +129,7 @@ export default defineComponent({
const inputClass = computed(() => {
return twMerge(twJoin(
ui.value.base,
ui.value.form,
ui.value.rounded,
ui.value.background,
ui.value.border,