Skip to content

Commit

Permalink
Applied styles and functionality for the humidity progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
hmdNetizen committed Jul 1, 2021
1 parent d33157c commit 1b5a3a7
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/components/RectangularCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ const RectangularCard: React.FC = () => {
<p className="rectangular__card__progressBar__point">50</p>
<p className="rectangular__card__progressBar__point">100</p>
</div>
<div className="rectangular__card__progressBar__line" />
<div className="rectangular__card__progressBar__line">
<div
className="rectangular__card__progressBar__done"
style={{
width: weatherData.consolidated_weather[0].humidity + "%",
}}
/>
</div>
<p className="rectangular__card__progressBar__percent">%</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SquareCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import moment from "moment";
import showWeatherImage from "./showWeatherImage";
import showWeatherImage from "../helpers/showWeatherImage";

interface Props {
day: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/Aside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Moment from "react-moment";
import cloudBackground from "../../assets/Cloud-background.png";
import { MdMyLocation, MdLocationOn } from "react-icons/md";
import { useTypedSelector } from "../hooks/useTypedSelector";
import showWeatherImage from "./../showWeatherImage";
import showWeatherImage from "../../helpers/showWeatherImage";

interface Props {
setOpenSearch: (openSearch: boolean) => void;
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions src/sass/components/_rectangularCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,20 @@
height: 0.5em;
border-radius: 10em;
margin-bottom: 0.2em;
background: $color-white;
position: relative;
}

&__done {
position: absolute;
border-radius: 10em;
top: 0;
left: 0;
height: 100%;
background: $color-yellow;
// animation-name: progress;
// animation-duration: 3s;
// animation-fill-mode: forwards;
}

&__percent {
Expand All @@ -80,3 +93,13 @@
}
}
}

// @keyframes progress {
// 0% {
// width: 0;
// }

// 100% {
// width: 90%;
// }
// }
10 changes: 10 additions & 0 deletions src/sass/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/sass/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b5a3a7

Please sign in to comment.