mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
compose store with custom values in config.js
This commit is contained in:
committed by
Franc Camps-Febrer
parent
87f2f5c796
commit
b7618543f7
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
|
||||
const TimelineZoomControls = ({ zoomLevels, dims, onApplyZoom }) => {
|
||||
|
||||
const TimelineZoomControls = ({ extent, zoomLevels, dims, onApplyZoom }) => {
|
||||
function renderZoom(zoom, idx) {
|
||||
const isActive = (zoom.duration === extent)
|
||||
return (
|
||||
<text
|
||||
className={`zoom-level-button ${zoom.active ? 'active' : ''}`}
|
||||
className={`zoom-level-button ${isActive ? 'active' : ''}`}
|
||||
x="60"
|
||||
y={(idx * 15) + 20}
|
||||
onClick={() => onApplyZoom(zoom)}
|
||||
@@ -22,4 +22,4 @@ const TimelineZoomControls = ({ zoomLevels, dims, onApplyZoom }) => {
|
||||
);
|
||||
}
|
||||
|
||||
export default TimelineZoomControls;
|
||||
export default TimelineZoomControls;
|
||||
|
||||
Reference in New Issue
Block a user