images go behind the dates now
This commit is contained in:
@@ -53,15 +53,15 @@
|
|||||||
>
|
>
|
||||||
{#snippet day({ day })}
|
{#snippet day({ day })}
|
||||||
<CalendarDay>
|
<CalendarDay>
|
||||||
{day.day}
|
|
||||||
{@const img = getImageForDate(day)}
|
{@const img = getImageForDate(day)}
|
||||||
{#if img}
|
{#if img}
|
||||||
<img
|
<img
|
||||||
src={img}
|
src={img}
|
||||||
alt=""
|
alt=""
|
||||||
class="h-4 w-full rounded-sm object-cover"
|
class="absolute inset-0 h-full w-full rounded-sm object-cover hover:opacity-20"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
<span class="relative z-10 text-white">{day.day}</span>
|
||||||
</CalendarDay>
|
</CalendarDay>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</Calendar>
|
</Calendar>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
bind:ref
|
bind:ref
|
||||||
class={cn(
|
class={cn(
|
||||||
buttonVariants({ variant: "ghost" }),
|
buttonVariants({ variant: "ghost" }),
|
||||||
"flex size-(--cell-size) flex-col items-center justify-center gap-1 p-0 leading-none font-normal whitespace-nowrap select-none",
|
"relative flex flex-1 flex-col items-center justify-center gap-1 p-0 leading-none font-normal whitespace-nowrap select-none",
|
||||||
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground",
|
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground",
|
||||||
"data-[selected]:bg-primary dark:data-[selected]:hover:bg-accent/50 data-[selected]:text-primary-foreground",
|
"data-[selected]:bg-primary dark:data-[selected]:hover:bg-accent/50 data-[selected]:text-primary-foreground",
|
||||||
// Outside months
|
// Outside months
|
||||||
|
|||||||
@@ -9,4 +9,4 @@
|
|||||||
}: CalendarPrimitive.GridRowProps = $props();
|
}: CalendarPrimitive.GridRowProps = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<CalendarPrimitive.GridRow bind:ref class={cn("flex", className)} {...restProps} />
|
<CalendarPrimitive.GridRow bind:ref class={cn("flex flex-1 gap-1", className)} {...restProps} />
|
||||||
|
|||||||
Reference in New Issue
Block a user