mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-08 05:43:18 +01:00
29 lines
855 B
Vue
29 lines
855 B
Vue
<script setup lang="ts">
|
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/packages/ui/src';
|
|
import { weekdayOptions } from '@/utils/weekdays';
|
|
import type { Weekday } from '@/packages/api/src';
|
|
|
|
const model = defineModel<Weekday | ''>({ required: true });
|
|
|
|
defineProps<{
|
|
id?: string;
|
|
disabled?: boolean;
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
<Select v-model="model" :disabled="disabled">
|
|
<SelectTrigger :id="id" class="w-full font-normal">
|
|
<SelectValue placeholder="Select a week day" />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectItem
|
|
v-for="weekday in weekdayOptions"
|
|
:key="weekday.value"
|
|
:value="weekday.value">
|
|
{{ weekday.label }}
|
|
</SelectItem>
|
|
</SelectContent>
|
|
</Select>
|
|
</template>
|