Skip to content

Commit

Permalink
feat: add tooltips for class in search results table
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Feb 9, 2024
1 parent 880a852 commit a0a2a07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions components/search-results-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@ const { d } = useI18n();
<TableBody>
<TableRow v-for="entity of props.entities" :key="entity.properties._id">
<TableCell class="font-medium">
<Component :is="getEntityIcon(entity.systemClass)" class="size-4 shrink-0" />
<span class="sr-only">{{ entity.systemClass }}</span>
<TooltipProvider>
<Tooltip>
<TooltipTrigger class="cursor-default">
<Component :is="getEntityIcon(entity.systemClass)" class="size-4 shrink-0" />
</TooltipTrigger>
<TooltipContent>
{{ t(`SystemClassNames.${entity.systemClass}`) }}
</TooltipContent>
</Tooltip>
</TooltipProvider>
<span class="sr-only">{{ t(`SystemClassNames.${entity.systemClass}`) }}</span>
</TableCell>
<TableCell>
<NavLink
Expand Down
2 changes: 1 addition & 1 deletion components/ui/tooltip/TooltipTrigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const props = defineProps<TooltipTriggerProps>();
</script>

<template>
<TooltipTrigger v-bind="props" class="">
<TooltipTrigger v-bind="props">
<slot />
</TooltipTrigger>
</template>

0 comments on commit a0a2a07

Please sign in to comment.