Function
LoadingTextSwap
({
isLoading,
children,
}: {
isLoading: boolean
children: ReactNode
})
Source from the content-addressed store, hash-verified
| 70 | } |
| 71 | |
| 72 | function LoadingTextSwap({ |
| 73 | isLoading, |
| 74 | children, |
| 75 | }: { |
| 76 | isLoading: boolean |
| 77 | children: ReactNode |
| 78 | }) { |
| 79 | return ( |
| 80 | <div className="grid items-center justify-items-center"> |
| 81 | <div |
| 82 | className={cn( |
| 83 | "col-start-1 col-end-2 row-start-1 row-end-2", |
| 84 | isLoading ? "invisible" : "visible" |
| 85 | )} |
| 86 | > |
| 87 | {children} |
| 88 | </div> |
| 89 | <div |
| 90 | className={cn( |
| 91 | "col-start-1 col-end-2 row-start-1 row-end-2 text-center", |
| 92 | isLoading ? "visible" : "invisible" |
| 93 | )} |
| 94 | > |
| 95 | <Loader2Icon className="animate-spin" /> |
| 96 | </div> |
| 97 | </div> |
| 98 | ) |
| 99 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected