compose store with custom values in config.js

This commit is contained in:
Lachlan Kermode
2019-01-17 11:37:04 +00:00
committed by Franc Camps-Febrer
parent 87f2f5c796
commit b7618543f7
8 changed files with 41 additions and 69 deletions

View File

@@ -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;