import type { ReactNode } from 'react'
import { Icon, type IconName } from './Icon'
export function PageHead({ title, description, actions }: { title: string; description: string; actions?: ReactNode }) {
return (
)
}
// Shimmer placeholders shaped like the content they stand in for, so a page keeps its layout while loading.
export function Skeleton({ w, h, className }: { w?: number | string; h?: number | string; className?: string }) {
return
}
const LINE_WIDTHS = ['62%', '48%', '70%', '55%']
export function SkeletonRows({ count = 3, label }: { count?: number; label: string }) {
return (
{Array.from({ length: count }, (_, i) => (
))}
)
}
export function SkeletonCards({ count = 4, label }: { count?: number; label: string }) {
return (
{Array.from({ length: count }, (_, i) => (
))}
)
}
export function SkeletonLines({ count = 2, label }: { count?: number; label: string }) {
return (
{Array.from({ length: count }, (_, i) => )}
)
}
export function Empty({ icon = 'book', title, children }: { icon?: IconName; title: string; children?: ReactNode }) {
return (
{title}
{children &&
{children}
}
)
}