mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
Cleaning technical debt (#192)
* 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
This commit is contained in:
40
src/components/controls/BottomActions.js
Normal file
40
src/components/controls/BottomActions.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import React from "react";
|
||||
|
||||
import SitesIcon from "../atoms/SitesIcon";
|
||||
import CoverIcon from "../atoms/CoverIcon";
|
||||
import InfoIcon from "../atoms/InfoIcon";
|
||||
|
||||
function BottomActions(props) {
|
||||
function renderToggles() {
|
||||
return (
|
||||
<>
|
||||
<div className="bottom-action-block">
|
||||
{props.features.USE_SITES ? (
|
||||
<SitesIcon
|
||||
isActive={props.sites.enabled}
|
||||
onClickHandler={props.sites.toggle}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
,
|
||||
<div className="botttom-action-block">
|
||||
<InfoIcon
|
||||
isActive={props.info.enabled}
|
||||
onClickHandler={props.info.toggle}
|
||||
/>
|
||||
</div>
|
||||
,
|
||||
<div className="botttom-action-block">
|
||||
{props.features.USE_COVER ? (
|
||||
<CoverIcon onClickHandler={props.cover.toggle} />
|
||||
) : null}
|
||||
</div>
|
||||
,
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return <div className="bottom-actions">{renderToggles()}</div>;
|
||||
}
|
||||
|
||||
export default BottomActions;
|
||||
Reference in New Issue
Block a user