edit cards and switch
This commit is contained in:
parent
cf68971de5
commit
1dced10ce7
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
}
|
@ -17,7 +17,8 @@ export const MainCard = ({
|
|||||||
</h1>
|
</h1>
|
||||||
<p className={styles.description}>{description}</p>
|
<p className={styles.description}>{description}</p>
|
||||||
<Image
|
<Image
|
||||||
className={styles.image}
|
width="300px"
|
||||||
|
height="300px"
|
||||||
src={`/icons/${iconName}.svg`}
|
src={`/icons/${iconName}.svg`}
|
||||||
alt="weatherIcon"
|
alt="weatherIcon"
|
||||||
/>
|
/>
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 300px;
|
|
||||||
height: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.temperature {
|
.temperature {
|
||||||
font-size: 84px;
|
font-size: 84px;
|
||||||
}
|
}
|
||||||
|
@ -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 className={styles.image} src={iconSrc} alt="weatherIcon" />
|
<Image width="100px" height="100px" src={iconSrc} alt="weatherIcon" />
|
||||||
<div>
|
<div>
|
||||||
<h1>{metric}</h1>
|
<h1>{metric}</h1>
|
||||||
<p>{unit}</p>
|
<p>{unit}</p>
|
||||||
|
@ -9,11 +9,6 @@
|
|||||||
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;
|
||||||
|
@ -4,15 +4,17 @@ export const UnitSwitch = ({ onClick, systemUsed }) => {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<p
|
<p
|
||||||
className={styles.switch}
|
className={`${styles.switch} ${
|
||||||
style={{ color: systemUsed == "metric" ? "green" : "black" }}
|
systemUsed == "metric" ? styles.active : styles.inactive
|
||||||
|
}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
Metric System
|
Metric System
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
className={styles.switch}
|
className={`${styles.switch} ${
|
||||||
style={{ color: systemUsed == "metric" ? "black" : "green" }}
|
systemUsed == "metric" ? styles.inactive : styles.active
|
||||||
|
}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
Imperial System
|
Imperial System
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inactive {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 475px) {
|
@media only screen and (max-width: 475px) {
|
||||||
.wrapper {
|
.wrapper {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user