Skip to content

Commit

Permalink
Changed the Celsius and Fahreneit indicator from div elements to butt…
Browse files Browse the repository at this point in the history
…on elements
  • Loading branch information
hmdNetizen committed Jun 26, 2021
1 parent 79d5453 commit d58cf19
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
16 changes: 6 additions & 10 deletions src/components/layouts/ContentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ const ContentSection: React.FC = () => {
return (
<section className="section">
<div className="section__temperature">
<div className="section__temperature__wrapper section__temperature__wrapper--celsius">
<p>
<sup>o</sup>C
</p>
</div>
<div className="section__temperature__wrapper section__temperature__wrapper--fahrenheit">
<p>
<sup>o</sup>F
</p>
</div>
<button className="section__temperature__button section__temperature__button--celsius">
<sup>o</sup>C
</button>
<button className="section__temperature__button section__temperature__button--fahrenheit">
<sup>o</sup>F
</button>
</div>
<div className="card">
{[...new Array(5)].map((data: any) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/MainContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const MainContents: React.FC = () => {
const [openSearch, setOpenSearch] = useState(false);
return (
<main className="main">
<aside className={`aside`}>
<aside className="aside">
{!openSearch ? (
<AsideContent setOpenSearch={setOpenSearch} openSearch={openSearch} />
) : (
Expand Down
1 change: 1 addition & 0 deletions src/sass/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ $color-light-blue: #3c47e9;
$color-light-blue-1: #3a44d8;
$color-light-blue-2: #343ec5;
$color-dark-blue: #110e3c;
$color-dark-blue-1: #0f0b53;
$color-yellow: #ffec65;
22 changes: 13 additions & 9 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.

18 changes: 11 additions & 7 deletions src/sass/layout/_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,30 @@
display: flex;
justify-content: flex-end;

&__wrapper {
&__button {
@include roundedCircle;
display: block;
height: 3em;
width: 3em;
border: 0;
cursor: pointer;

&--celsius {
background: $color-white;
color: $color-dark-blue;
margin-right: 1em;

& p {
font-size: 1.5rem;
font-weight: 600;
&:active {
background: $color-grey-light-1;
}
}

&--fahrenheit {
background: $color-tertiary;
color: $color-white;

& p {
font-size: 1.5rem;
font-weight: 600;
&:active {
background: $color-dark-blue-1;
}
}
}
Expand Down

0 comments on commit d58cf19

Please sign in to comment.