Files
grungnet/src/components/map/controls/FogPreviewToggle.js
Mitchell McCaffrey 558db7d88b Changed fog so it is tranparent when you can edit it
Added a show preview toggle to see how others will see it.
Refactored fog and drawing props to simplify
2020-08-04 14:51:31 +10:00

20 lines
626 B
JavaScript

import React from "react";
import { IconButton } from "theme-ui";
import PreviewOnIcon from "../../../icons/FogPreviewOnIcon";
import PreviewOffIcon from "../../../icons/FogPreviewOffIcon";
function FogPreviewToggle({ useFogPreview, onFogPreviewChange }) {
return (
<IconButton
aria-label={useFogPreview ? "Disable Fog Preview" : "Enable Fog Preview"}
title={useFogPreview ? "Disable Fog Preview" : "Enable Fog Preview"}
onClick={() => onFogPreviewChange(!useFogPreview)}
>
{useFogPreview ? <PreviewOnIcon /> : <PreviewOffIcon />}
</IconButton>
);
}
export default FogPreviewToggle;