initial commit
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
This commit is contained in:
25
packages/frontend/components/yale/FormInput.vue
Normal file
25
packages/frontend/components/yale/FormInput.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLInputTypes } from '~/types/html-input-types';
|
||||
|
||||
const props = defineProps<{
|
||||
type: HTMLInputTypes
|
||||
placeholder: string
|
||||
modelValue: string
|
||||
}>();
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:modelValue'
|
||||
])
|
||||
|
||||
const handleInput = (event: Event) => {
|
||||
// If input is a text input, emit the value
|
||||
if (props.type === 'text' || props.type === 'password') {
|
||||
emit('update:modelValue', (event.target as HTMLInputElement).value);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input class="bg-zinc-900 p-2 rounded-md" :type="props.type"
|
||||
:value="props.modelValue" :placeholder="props.placeholder" @input="handleInput">
|
||||
</template>~/types/html-input-types
|
Reference in New Issue
Block a user