Skip to content

Commit

Permalink
update: backgroundAnimation opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTeida committed Jan 27, 2024
1 parent 3d061d4 commit d6d55a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/components/BackgroundAnimation.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import {Box} from "@mui/joy";
import {Box, useColorScheme} from "@mui/joy";
import '../styles/backgroundAnimation.scss'
import {useEffect, useState} from "react";

function BackgroundAnimation() {
const {mode} = useColorScheme();
const [opacity, setOpacity] = useState("10%")

useEffect(() => {
mode === 'light' ? setOpacity("20%") : setOpacity("40%")
},[mode])

return (
<Box className="background">
<Box sx={{opacity: opacity}} className="background">
<Box component="span"></Box>
<Box component="span"></Box>
<Box component="span"></Box>
Expand Down
1 change: 0 additions & 1 deletion src/styles/backgroundAnimation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
animation-duration: 30;
animation-timing-function: linear;
animation-iteration-count: infinite;
opacity: 40%;
}


Expand Down

0 comments on commit d6d55a5

Please sign in to comment.