Skip to content

Commit

Permalink
changed some color box problems
Browse files Browse the repository at this point in the history
  • Loading branch information
elhagen13 committed Nov 19, 2023
1 parent 0f457f1 commit 2d78410
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ColorBox = ({ color, onClick }) => {
};

const ColorBoxContainer = () => {
const [backgroundColor, setBackgroundColor] = useState("#374954"); // Initial background color
const [backgroundColor, setBackgroundColor] = useState(document.body.style.backgroundColor); // Initial background color

const colors = [
"#374954",
Expand Down
3 changes: 3 additions & 0 deletions packages/studywell-frontend/src/pages/LongBreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import "../components/timer/Timer.css";
import React from "react";
import Timer from "../components/timer/Timer";
import "./Page.css";
import ColorBox from "../components/colorbox/ColorBox";


function LongBreak() {
return (
Expand All @@ -13,6 +15,7 @@ function LongBreak() {
<div className="break_text">
<p>Stretch and grab a snack!</p>
</div>
<ColorBox />
</div>
);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/studywell-frontend/src/pages/ShortBreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import "../App.css";
import "../components/timer/Timer.css";
import "./Page.css";
import Timer from "../components/timer/Timer";
import ColorBox from "../components/colorbox/ColorBox";


function ShortBreak() {
return (
Expand All @@ -12,6 +14,7 @@ function ShortBreak() {
<div className="break_text">
<p>Stretch and grab a snack!</p>
</div>
<ColorBox />
</div>
);
}
Expand Down

0 comments on commit 2d78410

Please sign in to comment.