mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-16 09:43:18 +01:00
Add goals feature for personal goals with filters
This commit is contained in:
@@ -3,11 +3,15 @@ import { XMarkIcon, ChevronDownIcon } from '@heroicons/vue/16/solid';
|
||||
import type { Component } from 'vue';
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/packages/ui/src';
|
||||
|
||||
defineProps<{
|
||||
icon: Component;
|
||||
label: string;
|
||||
filterName: string;
|
||||
}>();
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
icon: Component;
|
||||
label: string;
|
||||
filterName: string;
|
||||
operator?: string;
|
||||
}>(),
|
||||
{ operator: 'is' }
|
||||
);
|
||||
|
||||
defineEmits<{
|
||||
remove: [];
|
||||
@@ -26,7 +30,7 @@ defineSlots<{
|
||||
class="inline-flex items-center gap-1.5 px-2 py-1 text-sm hover:bg-quaternary dark:hover:bg-tertiary rounded-l-md transition-colors whitespace-nowrap">
|
||||
<component :is="icon" class="h-3.5 w-3.5 text-icon-default" />
|
||||
<span class="font-medium text-foreground">{{ filterName }}</span>
|
||||
<span class="text-muted-foreground">is</span>
|
||||
<span class="text-muted-foreground">{{ operator }}</span>
|
||||
<span class="text-foreground">{{ label }}</span>
|
||||
<ChevronDownIcon class="h-3 w-3 text-muted-foreground" />
|
||||
</DropdownMenuTrigger>
|
||||
@@ -36,6 +40,8 @@ defineSlots<{
|
||||
</DropdownMenu>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
:aria-label="`Remove ${filterName} filter`"
|
||||
class="px-1.5 py-1 hover:bg-quaternary dark:hover:bg-tertiary h-full rounded-r-md transition-colors group border-l border-border-secondary"
|
||||
@click="$emit('remove')">
|
||||
<XMarkIcon class="h-3.5 w-3.5 text-muted-foreground group-hover:text-foreground" />
|
||||
|
||||
Reference in New Issue
Block a user