aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-17 12:39:54 +0000
committerMohamedBassem <me@mbassem.com>2024-02-17 12:39:54 +0000
commit5a3fd2d7573c62467a40c919244d12b468458a38 (patch)
tree03e1ac06727b4537fdaf9d0611489566d93d5552
parent9235e9a6fbb364713105137b6bf5bba9d81ecd4c (diff)
downloadkarakeep-5a3fd2d7573c62467a40c919244d12b468458a38.tar.zst
ui: Add bookmark card skeleton
-rw-r--r--packages/web/app/dashboard/bookmarks/components/BookmarkCardSkeleton.tsx32
-rw-r--r--packages/web/components/ui/skeleton.tsx15
-rw-r--r--packages/web/public/blur.avifbin0 -> 52746 bytes
3 files changed, 47 insertions, 0 deletions
diff --git a/packages/web/app/dashboard/bookmarks/components/BookmarkCardSkeleton.tsx b/packages/web/app/dashboard/bookmarks/components/BookmarkCardSkeleton.tsx
new file mode 100644
index 00000000..d28a229e
--- /dev/null
+++ b/packages/web/app/dashboard/bookmarks/components/BookmarkCardSkeleton.tsx
@@ -0,0 +1,32 @@
+import {
+ ImageCard,
+ ImageCardBody,
+ ImageCardContent,
+ ImageCardFooter,
+ ImageCardTitle,
+ ImageCardBanner,
+} from "@/components/ui/imageCard";
+import { Skeleton } from "@/components/ui/skeleton";
+
+export default function BookmarkCardSkeleton() {
+ return (
+ <ImageCard
+ className={
+ "border-grey-100 border bg-gray-50 duration-300 ease-in hover:border-blue-300 hover:transition-all"
+ }
+ >
+ <ImageCardBanner src="/blur.avif" />
+ <ImageCardContent>
+ <ImageCardTitle>
+ </ImageCardTitle>
+ <ImageCardBody className="space-y-2">
+ <Skeleton className="h-4 w-full" />
+ <Skeleton className="h-4 w-full" />
+ <Skeleton className="h-4 w-full" />
+ </ImageCardBody>
+ <ImageCardFooter>
+ </ImageCardFooter>
+ </ImageCardContent>
+ </ImageCard>
+ );
+}
diff --git a/packages/web/components/ui/skeleton.tsx b/packages/web/components/ui/skeleton.tsx
new file mode 100644
index 00000000..01b8b6d4
--- /dev/null
+++ b/packages/web/components/ui/skeleton.tsx
@@ -0,0 +1,15 @@
+import { cn } from "@/lib/utils"
+
+function Skeleton({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+ return (
+ <div
+ className={cn("animate-pulse rounded-md bg-muted", className)}
+ {...props}
+ />
+ )
+}
+
+export { Skeleton }
diff --git a/packages/web/public/blur.avif b/packages/web/public/blur.avif
new file mode 100644
index 00000000..cbc6cd37
--- /dev/null
+++ b/packages/web/public/blur.avif
Binary files differ