💄 (design system) add form input to custom design system

This commit is contained in:
Julien Calixte
2023-05-27 23:04:22 +02:00
parent 67af65afff
commit cdd5d8121d
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<script setup lang="ts">
defineProps<{
id: string
label: string
modelValue: string
}>()
defineEmits<{
(event: "update:modelValue", value: string): void
}>()
</script>
<template>
<div class="form-input">
<label :for="id">{{ label }}</label>
<input
type="text"
id="id"
:value="modelValue"
@input="$emit('update:modelValue', $event.target?.value ?? '')"
/>
</div>
</template>
<style scoped lang="scss">
.form-input {
display: flex;
gap: 1rem;
}
</style>