1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 15:07:27 +00:00
festa/components/postcard/PostcardRenderer.tsx

20 lines
No EOL
523 B
TypeScript

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