mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
Polygon checkbox working active and inactive; need to hook up action to filter through events
This commit is contained in:
@@ -5,8 +5,8 @@ const Checkbox = ({ label, isActive, onClickCheckbox, color, styleProps }) => {
|
||||
<div className={isActive ? "item active" : "item"}>
|
||||
<span style={{ color: color }}>{label}</span>
|
||||
<button onClick={onClickCheckbox}>
|
||||
<div className="border">
|
||||
<div className="checkbox" style={styleProps} />
|
||||
<div className="border" style={styleProps.containerStyles}>
|
||||
<div className="checkbox" style={styleProps.checkboxStyles} />
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,11 @@ const PanelTree = ({ data, activeValues, onSelect, defaultCheckboxColor }) => {
|
||||
{data.map((val) => {
|
||||
const isActive = activeValues.includes(val.title);
|
||||
const baseStyles = {
|
||||
background: isActive ? defaultCheckboxColor : "none",
|
||||
border: `1px solid ${defaultCheckboxColor}`,
|
||||
checkboxStyles: {
|
||||
background: isActive ? defaultCheckboxColor : "none",
|
||||
border: `1px solid ${defaultCheckboxColor}`,
|
||||
},
|
||||
containerStyles: {},
|
||||
};
|
||||
return (
|
||||
<li
|
||||
|
||||
Reference in New Issue
Block a user