add classnames

This commit is contained in:
madarsbiss 2021-09-23 13:03:05 +03:00
parent be238fe88b
commit 3cc4bd3f54
4 changed files with 15 additions and 6 deletions

View File

@ -17,12 +17,11 @@ export const MainCard = ({
</h1> </h1>
<p className={styles.description}>{description}</p> <p className={styles.description}>{description}</p>
<Image <Image
alt="weatherIcon" className={styles.image}
src={`/icons/${iconName}.svg`} src={`/icons/${iconName}.svg`}
height="300px" alt="weatherIcon"
width="300px"
/> />
<h1 className={styles.mainTemp}> <h1 className={styles.temperature}>
{systemUsed == "metric" {systemUsed == "metric"
? Math.round(weatherData.main.temp) ? Math.round(weatherData.main.temp)
: Math.round(ctoF(weatherData.main.temp))} : Math.round(ctoF(weatherData.main.temp))}

View File

@ -13,6 +13,11 @@
margin-bottom: 20px; margin-bottom: 20px;
} }
.mainTemp { .image {
width: 300px;
height: 300px;
}
.temperature {
font-size: 84px; font-size: 84px;
} }

View File

@ -6,7 +6,7 @@ export const MetricsCard = ({ title, iconSrc, metric, unit }) => {
<div className={styles.wrapper}> <div className={styles.wrapper}>
<p>{title}</p> <p>{title}</p>
<div className={styles.content}> <div className={styles.content}>
<Image alt="weatherIcon" src={iconSrc} height="100px" width="100px" /> <Image className={styles.image} src={iconSrc} alt="weatherIcon" />
<div> <div>
<h1>{metric}</h1> <h1>{metric}</h1>
<p>{unit}</p> <p>{unit}</p>

View File

@ -9,6 +9,11 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
.image {
height: 100px;
width: 100px;
}
@media only screen and (max-width: 475px) { @media only screen and (max-width: 475px) {
.content { .content {
grid-template-columns: 1fr 2fr; grid-template-columns: 1fr 2fr;