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-14.2.0.pre.alpha.PLAY15063626 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.PLAY15063624 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.play1432playgroundsanitation3622 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.PLAY15063621 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.PLAY15063620 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.PLAY15063619 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.2.0.pre.alpha.PLAY15063618 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.3.0.pre.rc.0 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063617 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063616 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063615 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063614 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063613 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063612 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PLAY15063610 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PBNTR417addcolorsupdatedefaultcolor3608 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PBNTR449rtepreviewerrails3605 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PA1477timestampkit3601 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.PBNTR462starratingdefaultvalue3600 app/pb_kits/playbook/pb_map/_map_controls.tsx
playbook_ui-14.1.0.pre.alpha.pbntr373enablekitsforradio3595 app/pb_kits/playbook/pb_map/_map_controls.tsx