Sha256: e2384f18f17f58f179d180ddf1f86b60100c94677c5025cfb924298eff500853

Contents?: true

Size: 1.25 KB

Versions: 302

Compression:

Stored size: 1.25 KB

Contents

import React from "react";
import Button from "../pb_button/_button";
import Icon from "../pb_icon/_icon";
import Flex from "../pb_flex/_flex";

type MapControlTypes = {
  zoomBtns?: boolean, 
  flyTo?: boolean, 
  zoomInClick?: () => void,
  zoomOutClick?: () => void,
  flyToClick?: () => void,
  children?: React.ReactNode | React.ReactNode[]
}

const MapControls = ({
  zoomBtns,
  zoomInClick,
  zoomOutClick,
  flyTo,
  flyToClick,
  children,
}: MapControlTypes) => {
  return (
    <Flex className="custom-nav-control"
        orientation="column"
    >
      {zoomBtns ? (
        <>
          <div className="custom-nav-control-zoom">
            <Button className="map-zoom-in-button"
                onClick={zoomInClick}
            >
              <Icon icon="plus" />
            </Button>
            <Button className="map-zoom-out-button"
                onClick={zoomOutClick}
            >
              <Icon icon="minus" />
            </Button>
          </div>
          {flyTo ? (
            <Button className="map-flyto-button"
                onClick={flyToClick}
            >
              <Icon icon="eye" />
            </Button>
          ) : null}
        </>
      ) : null}
      {children}
    </Flex>
  );
};

export default MapControls;

Version data entries

302 entries across 302 versions & 1 rubygems

Version Path
playbook_ui-13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR238DatePickerYearBug2436 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2431 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2415 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.20.0.pre.alpha.play1247htmloptions2404 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.20.0.pre.alpha.play1247htmloptions2403 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.20.0.pre.alpha.PLAY12572402 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.21.0 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.20.0.pre.alpha.PBNTR225advancedtablefeedback2375 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.PBNTR200addadvancedtablekitdarkmodestyles2346 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2345 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2342 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1186collapsiblenaviconcolorbug2321 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.PBNTR211tablekitsubcomponentsreact2318 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2306 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2305 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.20.0 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.play1141iconkitusinglibrary2264 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.PBNTR207tabledivsupport2261 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-13.19.0.pre.alpha.PBNTR207tabledivsupport2245 app/pb_kits/playbook/pb_map/_map_controls.tsx