@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 26 lines 619 Bytes
Raw
1 import { cva, type VariantProps } from "class-variance-authority";
2
3 import { cn } from "~/lib/utils";
4
5 const skeletonVariants = cva("bg-muted-foreground/15 motion-safe:animate-skeleton", {
6 variants: {
7 shape: {
8 block: "rounded-sm",
9 card: "rounded-lg",
10 pill: "rounded-full",
11 },
12 },
13 defaultVariants: { shape: "block" },
14 });
15
16 function Skeleton({
17 className,
18 shape,
19 ...props
20 }: React.ComponentProps<"div"> & VariantProps<typeof skeletonVariants>) {
21 return (
22 <div className={cn(skeletonVariants({ shape }), className)} data-slot="skeleton" {...props} />
23 );
24 }
25
26 export { Skeleton };