32 lines
1.0 KiB
Vue
32 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
modelValue?: string | number;
|
|
type?: string;
|
|
placeholder?: string;
|
|
disabled?: boolean;
|
|
required?: boolean;
|
|
id?: string;
|
|
name?: string;
|
|
autocomplete?: string;
|
|
autofocus?: boolean;
|
|
}>();
|
|
|
|
defineEmits(['update:modelValue']);
|
|
</script>
|
|
|
|
<template>
|
|
<input
|
|
:id="id"
|
|
:name="name"
|
|
:type="type || 'text'"
|
|
:value="modelValue"
|
|
:placeholder="placeholder"
|
|
:disabled="disabled"
|
|
:required="required"
|
|
:autocomplete="autocomplete"
|
|
:autofocus="autofocus"
|
|
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
|
class="flex h-9 w-full rounded-md border border-[#151515] bg-[#0a0a0a] px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[#888888] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#00f2ff] disabled:cursor-not-allowed disabled:opacity-50 text-white"
|
|
/>
|
|
</template>
|