mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* 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.
30 lines
992 B
TypeScript
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>
|
|
)
|
|
}
|