Files
web/components/SkeletonShimmer/index.tsx
2024-12-17 09:41:40 +01:00

36 lines
581 B
TypeScript

import { cva } from "class-variance-authority"
import styles from "./skeleton.module.css"
const variants = cva(styles.shimmer, {
variants: {
contrast: {
light: styles.light,
dark: styles.dark,
},
},
defaultVariants: {
contrast: "light",
},
})
export default function SkeletonShimmer({
height,
width,
contrast = "light",
}: {
height?: string
width?: string
contrast?: "light" | "dark"
}) {
return (
<span
className={variants({ contrast })}
style={{
height: height,
width: width,
}}
/>
)
}