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