MCPcopy Create free account
hub / github.com/WebDevSimplified/course-platform / LoadingTextSwap

Function LoadingTextSwap

src/components/ActionButton.tsx:72–99  ·  view source on GitHub ↗
({
  isLoading,
  children,
}: {
  isLoading: boolean
  children: ReactNode
})

Source from the content-addressed store, hash-verified

70}
71
72function 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

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected