refactor(loading): add className prop and support additional props

This commit is contained in:
cfngc4594 2025-03-18 19:34:00 +08:00
parent 7eb6eedf22
commit 449dfd56f2

View File

@ -1,8 +1,16 @@
import { cn } from "@/lib/utils";
import { Skeleton } from "@/components/ui/skeleton"; import { Skeleton } from "@/components/ui/skeleton";
export function Loading() { interface LoadingProps {
className?: string;
}
export function Loading({
className,
...props
}: LoadingProps) {
return ( return (
<div className="h-full w-full p-2"> <div className={cn("h-full w-full p-2", className)} {...props}>
<Skeleton className="h-full w-full rounded-3xl" /> <Skeleton className="h-full w-full rounded-3xl" />
</div> </div>
); );