Skip to content

Commit 7cc7c8e

Browse files
committed
fix: calendar date item style
1 parent 8bb3f9a commit 7cc7c8e

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-date-record.svelte

+28-20
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import { getTable } from "$lib/store/table.store"
88
import type { ViewColor } from "@undb/table"
99
import { getColor } from "./calendar-view.util"
10+
import * as Tooltip from "$lib/components/ui/tooltip"
1011
1112
export let record: RecordDO
1213
export let displayField: Field | undefined
@@ -60,24 +61,31 @@
6061
$: condition = isMatch ? color?.getMatchedFieldConditions($table, record)[0] : undefined
6162
</script>
6263

63-
<button
64-
class={cn(
65-
"h-[20px] w-full overflow-hidden rounded-sm border border-gray-300 px-1 py-0.5 text-left text-[10px] transition-all hover:shadow-md",
66-
$$restProps.class,
67-
isMatch && getColor(condition?.option.color),
68-
)}
69-
on:click={() => r.set(record.id.value)}
70-
use:setupDraggableDate={record}
71-
>
72-
<span class="truncate">
73-
<div class="flex items-center gap-1 truncate">
74-
<span class="font-semibold">
75-
{displayValue}
64+
<Tooltip.Root>
65+
<Tooltip.Trigger>
66+
<button
67+
class={cn(
68+
"h-[20px] w-full overflow-hidden rounded-sm border border-gray-300 px-1 py-0.5 text-left text-[10px] transition-all hover:shadow-md",
69+
$$restProps.class,
70+
isMatch && getColor(condition?.option.color),
71+
)}
72+
on:click={() => r.set(record.id.value)}
73+
use:setupDraggableDate={record}
74+
>
75+
<span class="truncate">
76+
<div class="flex items-center gap-1 truncate">
77+
<span class="font-semibold">
78+
{displayValue}
79+
</span>
80+
<span> · </span>
81+
<span>
82+
{value}
83+
</span>
84+
</div>
7685
</span>
77-
<span> · </span>
78-
<span>
79-
{value}
80-
</span>
81-
</div>
82-
</span>
83-
</button>
86+
</button>
87+
</Tooltip.Trigger>
88+
<Tooltip.Content>
89+
<p>{displayValue} · {value}</p>
90+
</Tooltip.Content>
91+
</Tooltip.Root>

0 commit comments

Comments
 (0)