File size: 1,749 Bytes
867b17d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
'use client';
import { ArtifactKind } from './artifact';
export const DocumentSkeleton = ({
artifactKind,
}: {
artifactKind: ArtifactKind;
}) => {
return artifactKind === 'image' ? (
<div className="flex flex-col gap-4 w-full justify-center items-center h-[calc(100dvh-60px)]">
<div className="animate-pulse rounded-lg bg-muted-foreground/20 size-96" />
</div>
) : (
<div className="flex flex-col gap-4 w-full">
<div className="animate-pulse rounded-lg h-12 bg-muted-foreground/20 w-1/2" />
<div className="animate-pulse rounded-lg h-5 bg-muted-foreground/20 w-full" />
<div className="animate-pulse rounded-lg h-5 bg-muted-foreground/20 w-full" />
<div className="animate-pulse rounded-lg h-5 bg-muted-foreground/20 w-1/3" />
<div className="animate-pulse rounded-lg h-5 bg-transparent w-52" />
<div className="animate-pulse rounded-lg h-8 bg-muted-foreground/20 w-52" />
<div className="animate-pulse rounded-lg h-5 bg-muted-foreground/20 w-2/3" />
</div>
);
};
export const InlineDocumentSkeleton = () => {
return (
<div className="flex flex-col gap-4 w-full">
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-48" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-3/4" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-1/2" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-64" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-40" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-36" />
<div className="animate-pulse rounded-lg h-4 bg-muted-foreground/20 w-64" />
</div>
);
};
|