mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +00:00
20 lines
No EOL
523 B
TypeScript
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})`
|
|
}}
|
|
/>
|
|
)
|
|
} |