1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 07:04:22 +00:00
festa/components/postcard/PostcardRenderer.tsx

20 lines
523 B
TypeScript
Raw Normal View History

2022-06-04 03:13:19 +00:00
import { PostcardContext } from "./PostcardContext"
import { useDefinedContext } from "../../utils/definedContext";
import classNames from "classnames";
2022-06-04 03:13:19 +00:00
export function PostcardRenderer() {
const {postcard, visible} = useDefinedContext(PostcardContext)
2022-06-04 03:13:19 +00:00
return (
2022-06-04 03:13:19 +00:00
<div
className={classNames({
"postcard": true,
"postcard-visible": visible,
})}
style={{
backgroundImage: `url(${postcard})`
}}
2022-06-04 03:13:19 +00:00
/>
)
2022-06-04 03:13:19 +00:00
}