mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 03:02:15 +01:00
move ui and api to seperate packages and add npm actions for them
This commit is contained in:
26
resources/js/packages/ui/src/Input/TextInput.vue
Normal file
26
resources/js/packages/ui/src/Input/TextInput.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
defineProps<{
|
||||
name?: string;
|
||||
}>();
|
||||
|
||||
const input = ref<HTMLInputElement | null>(null);
|
||||
|
||||
onMounted(() => {
|
||||
if (input.value?.hasAttribute('autofocus')) {
|
||||
input.value?.focus();
|
||||
}
|
||||
});
|
||||
|
||||
defineExpose({ focus: () => input.value?.focus() });
|
||||
const model = defineModel();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input
|
||||
ref="input"
|
||||
class="border-input-border border bg-input-background text-white focus:ring-input-border-active focus:ring-0 focus-visible:border-input-border-active rounded-md shadow-sm"
|
||||
v-model="model"
|
||||
:name="name" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user