Files
hossein-por-shop/frontend/components/profile/index/PersonalDataField.vue
T
2025-02-08 23:49:03 +03:30

34 lines
720 B
Vue

<script setup lang="ts">
// types
type Props = {
id?: string;
label: string;
required?: boolean;
error?: any;
};
// props
withDefaults(defineProps<Props>(), {
required: false,
});
</script>
<template>
<div class="w-full flex flex-col gap-2">
<div class="flex items-center gap-1 ps-2">
<label :for="id" class="typo-label-sm">{{ label }}</label>
<span v-if="required" class="text-danger-600">*</span>
</div>
<slot />
<div
class="w-full typo-label-xs flex items-center py-1 px-3 rounded-md text-danger-600"
>
این فیلد الزامی است
</div>
</div>
</template>
<style scoped></style>