mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 12:58:35 +03:00
* abstract Space component to switch out Map * basic viewing possible * restructure components dir * all jsx --> js * App.jsx --> App.js * comment out 3d for now
20 lines
471 B
JavaScript
20 lines
471 B
JavaScript
import React from "react";
|
|
|
|
const Checkbox = ({ label, isActive, onClickCheckbox, color }) => {
|
|
const styles = {
|
|
background: isActive ? color : "none",
|
|
border: `1px solid ${color}`,
|
|
};
|
|
|
|
return (
|
|
<div className={isActive ? "item active" : "item"}>
|
|
<span style={{ color: color }}>{label}</span>
|
|
<button onClick={onClickCheckbox}>
|
|
<div className="checkbox" style={styles} />
|
|
</button>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Checkbox;
|