Kasir/resources/js/components/InputField.vue
2025-08-28 13:07:35 +07:00

29 lines
617 B
Vue

<template>
<input
:type="type"
:value="modelValue"
@input="$emit('update:modelValue', $event.target.value)"
:placeholder="placeholder"
class="mt-1 block w-full rounded-md shadow-sm sm:text-sm bg-A text-D border-B focus:border-C focus:ring focus:ring-D focus:ring-opacity-50 p-2"
/>
</template>
<script setup>
const props = defineProps({
type: {
type: String,
default: 'text',
},
modelValue: {
type: [String, Number],
default: '',
},
placeholder: {
type: String,
default: '',
},
});
const emit = defineEmits(['update:modelValue']);
</script>