rename classes

This commit is contained in:
madarsbiss 2021-09-22 18:17:54 +03:00
parent d842dc0090
commit c88ba741f1
7 changed files with 14 additions and 14 deletions

View File

@ -2,7 +2,8 @@
background-color: rgb(247, 247, 247); background-color: rgb(247, 247, 247);
padding: 30px; padding: 30px;
text-align: right; text-align: right;
border-radius: 0 30px 30px 0; border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
} }
@media only screen and (max-width: 950px) { @media only screen and (max-width: 950px) {

View File

@ -11,7 +11,7 @@ import styles from "./MetricsBox.module.css";
const MetricsBox = ({ data, systemUsed }) => { const MetricsBox = ({ data, systemUsed }) => {
return ( return (
<div className={styles.statsBox}> <div className={styles.wrapper}>
<MetricCard <MetricCard
title={"Humidity"} title={"Humidity"}
iconSrc={"/icons/humidity.png"} iconSrc={"/icons/humidity.png"}

View File

@ -1,19 +1,18 @@
.statsBox { .wrapper {
display: grid; display: grid;
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
gap: 20px; gap: 20px;
border-radius: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
.statsBox { .wrapper {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
} }
@media only screen and (max-width: 475px) { @media only screen and (max-width: 475px) {
.statsBox { .wrapper {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
} }

View File

@ -4,9 +4,9 @@ import styles from "./MetricsCard.module.css";
const MetricsCard = ({ title, iconSrc, metric, unit }) => { const MetricsCard = ({ title, iconSrc, metric, unit }) => {
return ( return (
<div className={styles.statsCard}> <div className={styles.wrapper}>
<p>{title}</p> <p>{title}</p>
<div className={styles.statsCardContent}> <div className={styles.content}>
<Image alt="weatherIcon" src={iconSrc} height="100px" width="100px" /> <Image alt="weatherIcon" src={iconSrc} height="100px" width="100px" />
<div> <div>
<h1>{metric}</h1> <h1>{metric}</h1>

View File

@ -1,16 +1,16 @@
.statsCard { .wrapper {
background: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.95);
border-radius: 20px; border-radius: 20px;
padding: 20px; padding: 20px;
} }
.statsCardContent { .content {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
@media only screen and (max-width: 475px) { @media only screen and (max-width: 475px) {
.statsCardContent { .content {
grid-template-columns: 1fr 2fr; grid-template-columns: 1fr 2fr;
} }
} }

View File

@ -3,7 +3,7 @@ import styles from "./Search.module.css";
const Search = ({ placeHolder, value, onFocus, onChange, onKeyDown }) => { const Search = ({ placeHolder, value, onFocus, onChange, onKeyDown }) => {
return ( return (
<input <input
className={styles.input} className={styles.search}
type="text" type="text"
placeholder={placeHolder} placeholder={placeHolder}
value={value} value={value}

View File

@ -1,4 +1,4 @@
.input { .search {
margin-bottom: 20px; margin-bottom: 20px;
height: 40px; height: 40px;
border: none; border: none;
@ -12,7 +12,7 @@
} }
@media only screen and (max-width: 520px) { @media only screen and (max-width: 520px) {
.input { .search {
width: 100%; width: 100%;
} }
} }