forecast/components/UnitSwitch.js
2021-09-23 12:54:45 +03:00

23 lines
533 B
JavaScript

import styles from "./UnitSwitch.module.css";
export const UnitSwitch = ({ onClick, systemUsed }) => {
return (
<div className={styles.wrapper}>
<p
className={styles.switch}
style={{ color: systemUsed == "metric" ? "green" : "black" }}
onClick={onClick}
>
Metric System
</p>
<p
className={styles.switch}
style={{ color: systemUsed == "metric" ? "black" : "green" }}
onClick={onClick}
>
Imperial System
</p>
</div>
);
};