Skip to content

Commit

Permalink
[TSK-310] components: skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Oct 13, 2024
1 parent bf14e21 commit d5b44e1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export * from "./mode-toggle";
export * from "./research-context";
export * from "./site-header";
export * from "./site-footer";
export * from "./skeleton";
export * from "./spinner";
export * from "./table";
16 changes: 16 additions & 0 deletions lib/components/skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { cn } from "@/utils/utils";

export const Skeleton = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => {
return (
<div
className={cn(
"animate-pulse rounded-md bg-neutral-100 dark:bg-neutral-800",
className,
)}
{...props}
/>
);
};
1 change: 1 addition & 0 deletions lib/components/skeleton/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Skeleton } from "./Skeleton";
15 changes: 15 additions & 0 deletions lib/components/ui/skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { cn } from "@/utils/utils"

function Skeleton({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn("animate-pulse rounded-md bg-slate-100 dark:bg-slate-800", className)}
{...props}
/>
)
}

export { Skeleton }

0 comments on commit d5b44e1

Please sign in to comment.