feat: make skeleton title optional (#22396)

feat: skeleton title is optional

feat: skeleton title optional
This commit is contained in:
Min Idzelis 2025-10-07 09:58:59 -04:00 committed by GitHub
parent 5862c454b7
commit 78fbe0fd49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,18 +1,20 @@
<script lang="ts"> <script lang="ts">
interface Props { interface Props {
height: number; height: number;
title: string; title?: string;
} }
let { height = 0, title }: Props = $props(); let { height = 0, title }: Props = $props();
</script> </script>
<div class="overflow-clip" style:height={height + 'px'}> <div class="overflow-clip" style:height={height + 'px'}>
<div {#if title}
class="flex pt-7 pb-5 h-6 place-items-center text-xs font-medium text-immich-fg bg-light dark:text-immich-dark-fg md:text-sm" <div
> class="flex pt-7 pb-5 h-6 place-items-center text-xs font-medium text-immich-fg bg-light dark:text-immich-dark-fg md:text-sm"
{title} >
</div> {title}
</div>
{/if}
<div <div
class="animate-pulse absolute h-full ms-[10px] me-[10px]" class="animate-pulse absolute h-full ms-[10px] me-[10px]"
style:width="calc(100% - 20px)" style:width="calc(100% - 20px)"