website refactor

This commit is contained in:
2026-01-18 21:31:08 +01:00
parent 502d4aa092
commit b43a23a48c
96 changed files with 3461 additions and 4067 deletions

View File

@@ -1,23 +1,44 @@
import React from 'react';
import { Box } from './primitives/Box';
interface SkeletonProps {
export interface SkeletonProps {
width?: string | number;
height?: string | number;
circle?: boolean;
className?: string;
variant?: 'text' | 'circular' | 'rectangular';
animation?: 'pulse' | 'wave' | 'none';
}
export function Skeleton({ width, height, circle, className = '' }: SkeletonProps) {
export const Skeleton = ({
width,
height,
variant = 'rectangular',
animation = 'pulse'
}: SkeletonProps) => {
const variantClasses = {
text: 'rounded-sm',
circular: 'rounded-full',
rectangular: 'rounded-none',
};
const animationClasses = {
pulse: 'animate-pulse',
wave: 'animate-shimmer', // Assuming shimmer is defined
none: '',
};
const classes = [
'bg-[var(--ui-color-bg-surface-muted)]',
variantClasses[variant],
animationClasses[animation],
].join(' ');
return (
<Box
w={width}
h={height}
rounded={circle ? 'full' : 'md'}
bg="bg-white/5"
className={`animate-pulse ${className}`}
width={width}
height={height}
className={classes}
role="status"
aria-label="Loading..."
/>
);
}
};