Skip to content

Commit

Permalink
fix: add Skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug committed Aug 16, 2024
1 parent 03ae69c commit 15d0879
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/Skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {Skeleton as KitSkeleton} from '@gravity-ui/uikit';

import {useDelayed} from '../../utils/hooks/useDelayed';

interface SkeletonProps {
delay?: number;
className?: string;
}

export const Skeleton = ({delay = 600, className}: SkeletonProps) => {
const show = useDelayed(delay);
if (!show) {
return null;
}
return <KitSkeleton className={className} />;
};

0 comments on commit 15d0879

Please sign in to comment.