mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 18:52:14 +01:00
add timesheets page
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
const props = defineProps<{
|
||||
name?: string;
|
||||
class?: string;
|
||||
}>();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
name?: string;
|
||||
class?: string;
|
||||
size?: 'sm' | 'base';
|
||||
}>(),
|
||||
{ size: 'base' }
|
||||
);
|
||||
|
||||
const input = ref<HTMLInputElement | null>(null);
|
||||
|
||||
@@ -17,6 +21,10 @@ onMounted(() => {
|
||||
|
||||
defineExpose({ focus: () => input.value?.focus() });
|
||||
const model = defineModel();
|
||||
|
||||
const sizeClasses = computed(() =>
|
||||
props.size === 'sm' ? 'h-7 px-2 py-0.5 text-xs' : 'h-9 px-3 py-1 text-base sm:text-sm'
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -25,7 +33,8 @@ const model = defineModel();
|
||||
v-model="model"
|
||||
:class="
|
||||
twMerge(
|
||||
'h-9 px-3 py-1 text-base sm:text-sm border-input-border border bg-input-background text-text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent rounded-md shadow-sm',
|
||||
'border-input-border border bg-input-background text-text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent rounded-md shadow-sm',
|
||||
sizeClasses,
|
||||
props.class
|
||||
)
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user