forked from Weaverse/pilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IconTrash component and Skeleton component
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import clsx from "clsx"; | ||
|
||
/** | ||
* A shared component and Suspense call that's used in `App.server.jsx` to let your app wait for code to load while declaring a loading state | ||
*/ | ||
export function Skeleton({ | ||
as: Component = "div", | ||
width, | ||
height, | ||
className, | ||
...props | ||
}: { | ||
as?: React.ElementType; | ||
width?: string; | ||
height?: string; | ||
className?: string; | ||
[key: string]: any; | ||
}) { | ||
return ( | ||
<Component | ||
{...props} | ||
width={width} | ||
height={height} | ||
className={clsx("rounded bg-body/10", className)} | ||
/> | ||
); | ||
} |