Files
supabase/apps/studio/components/interfaces/Database/Publications/PublicationSkeleton.tsx
Ivan Vasilov cc47bcfa6d chore: Migrate studio to use ui-patterns/shimmeringLoader (#41405)
* Add shimmering-loader CSS to ui-patterns.

* Import the shimmering-loader classes from the ui-patterns component.

* Remove ShimmeringLoader from studio.

* Migrate studio to use ui-patterns/ShimmeringLoader.

* Migrate away from using default import for ShimmeringLoader.

* Fix the css imports in docs and studio.
2025-12-17 14:54:07 +01:00

30 lines
992 B
TypeScript

import { Switch, TableCell, TableRow } from 'ui'
import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader'
export interface PublicationSkeletonProps {
index?: number
}
export const PublicationSkeleton = ({ index }: PublicationSkeletonProps) => {
return (
<TableRow>
<TableCell style={{ width: '35%' }}>
<ShimmeringLoader className="h-4 w-24 my-0.5 p-0" delayIndex={index} />
</TableCell>
<TableCell className="hidden lg:table-cell" style={{ width: '15%' }}>
<ShimmeringLoader className="h-4 w-14 my-0.5 p-0" delayIndex={index} />
</TableCell>
{Array.from({ length: 4 }).map((_, i) => (
<TableCell key={i}>
<Switch size="small" checked={false} disabled={true} />
</TableCell>
))}
<TableCell className="px-4 py-3 pr-2">
<div className="flex justify-end">
<ShimmeringLoader className="h-6 w-12 p-0" delayIndex={index} />
</div>
</TableCell>
</TableRow>
)
}