-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4a18fc
commit 97dbb6a
Showing
4 changed files
with
71 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<div> | ||
<label :for="id" class="block text-sm font-medium text-gray-700 mb-1"> | ||
{{ label }} | ||
</label> | ||
<input | ||
:id="id" | ||
:type="type" | ||
:placeholder="placeholder" | ||
class="w-full border border-gray-300 rounded-lg shadow-sm p-2 focus:ring-2 focus:ring-blue-500 focus:outline-none" | ||
:value="modelValue" | ||
@input="$emit('update:modelValue', $event.target.value)" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
defineProps({ | ||
id: { type: String, required: true }, | ||
label: { type: String, required: true }, | ||
modelValue: { type: [String, Number], required: true }, // For v-model binding | ||
type: { type: String, default: "text" }, | ||
placeholder: { type: String, default: "" }, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters