💄 (design system) add form input to custom design system
This commit is contained in:
29
src/components/design-system/form/FormInput.vue
Normal file
29
src/components/design-system/form/FormInput.vue
Normal 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>
|
||||
Reference in New Issue
Block a user