website refactor
This commit is contained in:
26
apps/website/ui/Skeleton.tsx
Normal file
26
apps/website/ui/Skeleton.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
|
||||
interface SkeletonProps {
|
||||
width?: string | number;
|
||||
height?: string | number;
|
||||
circle?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function Skeleton({ width, height, circle, className = '' }: SkeletonProps) {
|
||||
const style: React.CSSProperties = {
|
||||
width: width,
|
||||
height: height,
|
||||
borderRadius: circle ? '9999px' : '0.375rem',
|
||||
backgroundColor: 'rgba(38, 38, 38, 0.4)',
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`animate-pulse ${className}`}
|
||||
style={style}
|
||||
role="status"
|
||||
aria-label="Loading..."
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user