diff --git a/src/components/layout.js b/src/components/layout.js
index 869ba57..19148a4 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -22,6 +22,7 @@ const shouldRenderSnow = () => {
function Snow() {
const [windowSize, setWindowSize] = useState([100, 200])
+ const [snowShowing, setSnowShowing] = useState(true)
useEffect(() => {
setWindowSize([window.innerWidth, window.innerHeight])
@@ -35,17 +36,25 @@ function Snow() {
if (typeof window !== 'object') return null
return ReactDOM.createPortal(
-
-
-
,
+ <>
+ setSnowShowing(!snowShowing)}
+ className={styles.snowToggleButton}
+ >
+ Hó on/off
+
+
+ {snowShowing && }
+
+ >,
document.body
)
}
diff --git a/src/components/layout.module.css b/src/components/layout.module.css
index 38651e1..2786e6a 100644
--- a/src/components/layout.module.css
+++ b/src/components/layout.module.css
@@ -246,3 +246,20 @@
top: 10px;
}
}
+
+.snowToggleButton {
+ color: #fcdb8c;
+ background-color: #303030;
+ z-index: 901;
+ position: fixed;
+ border-radius: 4px;
+ padding: 4px;
+ bottom: 20px;
+ right: 20px;
+ cursor: pointer;
+ opacity: 50%;
+}
+
+.snowToggleButton:hover {
+ opacity: 100%;
+}