Files
web/apps/scandic-web/components/SkeletonShimmer/index.tsx
Joakim Jäderberg 3c810d67a2 Merged in feature/SW-1736-foating-booking-widget (pull request #1696)
Feature/SW-1736 floating booking widget

* feature: Add floating booking widget on start page SW-1736

* fix: Make sure we don't try to use IntersectionObserver on the server

* fix: make sure that we disconnect the intersectionobserver when dismounting

* fix: pass searchparams to floating bookingwidget


Approved-by: Michael Zetterberg
2025-04-04 06:52:37 +00:00

40 lines
705 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",
display = "initial",
}: {
height?: string
width?: string
contrast?: "light" | "dark"
display?: "block" | "inline-block" | "initial"
}) {
return (
<span
className={variants({ contrast })}
style={{
height: height,
width: width,
maxWidth: "100%",
display: display,
}}
/>
)
}