Skip to content

Commit 7253cc4

Browse files
committed
fix: Tooltip
1 parent 520d61f commit 7253cc4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

app/components/HabitHeatmap.vue

+16-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ defineProps<{ habit: Habit; habitDays: number }>();
66
<div class="flex gap-0.5 overflow-hidden rounded-xl">
77
<div v-for="(week, weekIndex) in generateWeeks(habitDays)" :key="weekIndex" class="flex flex-col gap-0.5">
88
<div v-for="(day, dayIndex) in week" :key="dayIndex">
9-
<UTooltip :text="formatDate(day.date)" :popper="{ placement: 'top' }" :ui="{ wrapper: 'flex', rounded: 'rounded-full' }">
9+
<UTooltip :popper="{ placement: 'top' }" :ui="{ wrapper: '', background: '', ring: '', shadow: '', base: '' }">
1010
<div :class="['day', { active: habit.completeDays.includes(day.date) }]"></div>
11+
<template #text>
12+
<div :class="['chip', { active: habit.completeDays.includes(day.date) }]">{{ formatDate(day.date) }}</div>
13+
</template>
1114
</UTooltip>
1215
</div>
1316
</div>
@@ -21,4 +24,16 @@ defineProps<{ habit: Habit; habitDays: number }>();
2124
@apply bg-gradient-to-tr from-green-400 via-green-500 to-green-800 shadow-sm shadow-green-800;
2225
}
2326
}
27+
28+
.chip {
29+
font-size: 0.75rem;
30+
box-shadow:
31+
inset 0.5px 0.5px 1px 0px rgba(255, 255, 255, 0.1),
32+
inset -0.5px -0.5px 1px 0px rgba(0, 0, 0, 0.1),
33+
rgba(0, 0, 0, 0.2) 0px 3px 10px -5px;
34+
@apply flex select-none items-center justify-center rounded-full bg-black/70 px-2.5 py-0.5;
35+
&.active {
36+
@apply text-green-400;
37+
}
38+
}
2439
</style>

0 commit comments

Comments
 (0)