Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* global setTimeout */
import React, { PureComponent } from 'react';
import styled from 'styled-components';
import { EditorModes } from 'react-map-gl-draw';
const MODES = [
{ id: EditorModes.SELECT, text: 'Edit Feature', icon: 'icon-select.svg' },
{ id: EditorModes.DRAW_POINT, text: 'Draw Point', icon: 'icon-point.svg' },
{ id: EditorModes.DRAW_PATH, text: 'Draw Polyline', icon: 'icon-path.svg' },
{ id: EditorModes.DRAW_POLYGON, text: 'Draw Polygon', icon: 'icon-polygon.svg' },
{ id: EditorModes.DRAW_RECTANGLE, text: 'Draw Rectangle', icon: 'icon-rectangle.svg' }
];
const Container = styled.div`
position: absolute;
width: 48px;
left: 24px;
top: 24px;
background: #fff;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
outline: none;
display: flex;
justify-content: center;
flex-direction: column;
`;
const Row = styled.div`