Feat/BOOK-240 hero video
Approved-by: Chuma Mcphoy (We Ahead) Approved-by: Christel Westerberg
This commit is contained in:
10
apps/scandic-web/components/HeroVideo/heroVideo.module.css
Normal file
10
apps/scandic-web/components/HeroVideo/heroVideo.module.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.videoWrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
|
||||
&:not(.fullWidth) {
|
||||
border-radius: var(--Corner-radius-xl);
|
||||
}
|
||||
}
|
||||
29
apps/scandic-web/components/HeroVideo/index.tsx
Normal file
29
apps/scandic-web/components/HeroVideo/index.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { cx } from "class-variance-authority"
|
||||
|
||||
import { VideoPlayer } from "@scandic-hotels/design-system/VideoPlayer"
|
||||
|
||||
import styles from "./heroVideo.module.css"
|
||||
|
||||
import type { ComponentProps } from "react"
|
||||
|
||||
interface HeroVideoProps
|
||||
extends Omit<ComponentProps<typeof VideoPlayer>, "className" | "variant"> {
|
||||
className?: string
|
||||
isFullWidth?: boolean
|
||||
}
|
||||
|
||||
export function HeroVideo({
|
||||
className,
|
||||
isFullWidth,
|
||||
...props
|
||||
}: HeroVideoProps) {
|
||||
return (
|
||||
<div
|
||||
className={cx(styles.videoWrapper, className, {
|
||||
[styles.fullWidth]: isFullWidth,
|
||||
})}
|
||||
>
|
||||
<VideoPlayer variant="hero" {...props} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user