This commit is contained in:
2023-07-28 12:18:13 +02:00
parent f5977c1b5d
commit d943e81da4
14 changed files with 209 additions and 69 deletions

View File

@@ -1,15 +1,18 @@
<script setup>
defineProps({
modelValue: String,
modelValue: [String, Boolean, Number],
id: String,
type: {
type: String,
default: 'text',
},
label: String,
placeholder: String,
placeholder: {
type: String,
default: null,
},
error: {
type: Object,
type: String,
default: null,
},
textareaHeight: {
@@ -22,7 +25,8 @@ defineEmits(['update:modelValue']);
<template>
<div :class="['flex w-full', (type === 'checkbox' ? 'flex-row gap-2 items-center bg-gray-200 px-2 py-2 rounded-md' : 'flex-col gap-1')]">
<label :for="id"
<label v-if="id"
:for="id"
class="text-gray-500">{{ label }}</label>
<textarea v-if="type === 'textarea'"
:id="id"