diff --git a/public/components/ui/skeleton.tsx b/public/components/ui/skeleton.tsx new file mode 100644 index 0000000..cb9dcb2 --- /dev/null +++ b/public/components/ui/skeleton.tsx @@ -0,0 +1,31 @@ +import { cn } from '@public/lib/utils' + +interface SkeletonProps extends React.HTMLAttributes {} + +function Skeleton({ className, ...props }: SkeletonProps) { + return ( +
+ ) +} + +interface SkeletonShimmerProps extends React.HTMLAttributes {} + +function SkeletonShimmer({ className, ...props }: SkeletonShimmerProps) { + return ( +
+ ) +} + +export { Skeleton, SkeletonShimmer } diff --git a/public/editor/tabs/DomainsTab.tsx b/public/editor/tabs/DomainsTab.tsx index 0835be4..f3b3728 100644 --- a/public/editor/tabs/DomainsTab.tsx +++ b/public/editor/tabs/DomainsTab.tsx @@ -10,6 +10,7 @@ import { Button } from '@public/components/ui/button' import { Input } from '@public/components/ui/input' import { Label } from '@public/components/ui/label' import { Badge } from '@public/components/ui/badge' +import { SkeletonShimmer } from '@public/components/ui/skeleton' import { Dialog, DialogContent, @@ -128,8 +129,32 @@ export function DomainsTab({ {domainsLoading ? ( -
- +
+
+ {[...Array(2)].map((_, i) => ( +
+
+
+ + +
+ +
+ +
+ ))} +
+
+ +
+ + +
+ +
) : (
@@ -262,8 +287,26 @@ export function DomainsTab({ {domainsLoading ? ( -
- +
+ {[...Array(2)].map((_, i) => ( +
+
+
+ + +
+ +
+
+ + + +
+
+ ))}
) : customDomains.length === 0 ? (
diff --git a/public/editor/tabs/SitesTab.tsx b/public/editor/tabs/SitesTab.tsx index 6d5f8da..5792f04 100644 --- a/public/editor/tabs/SitesTab.tsx +++ b/public/editor/tabs/SitesTab.tsx @@ -7,6 +7,7 @@ import { } from '@public/components/ui/card' import { Button } from '@public/components/ui/button' import { Badge } from '@public/components/ui/badge' +import { SkeletonShimmer } from '@public/components/ui/skeleton' import { Globe, ExternalLink, @@ -84,8 +85,22 @@ export function SitesTab({ {sitesLoading ? ( -
- +
+ {[...Array(3)].map((_, i) => ( +
+
+
+ + +
+ +
+ +
+ ))}
) : sites.length === 0 ? (
diff --git a/public/styles/global.css b/public/styles/global.css index a3a3819..519b994 100644 --- a/public/styles/global.css +++ b/public/styles/global.css @@ -178,6 +178,12 @@ animation: arrow-bounce 1.5s ease-in-out infinite; } +@keyframes shimmer { + 100% { + transform: translateX(100%); + } +} + /* Shiki syntax highlighting styles */ .shiki-wrapper { border-radius: 0.5rem;