84 lines
2.7 KiB
TypeScript
84 lines
2.7 KiB
TypeScript
import React, { JSXElementConstructor } from "react";
|
|
import { IconProps, IconWrapper } from "constants/IconConstants";
|
|
import { ReactComponent as DeleteIcon } from "assets/icons/control/delete.svg";
|
|
import { ReactComponent as MoveIcon } from "assets/icons/control/move.svg";
|
|
import { ReactComponent as EditIcon } from "assets/icons/control/edit.svg";
|
|
import { ReactComponent as ViewIcon } from "assets/icons/control/view.svg";
|
|
import { ReactComponent as MoreVerticalIcon } from "assets/icons/control/more-vertical.svg";
|
|
import { ReactComponent as OverflowMenuIcon } from "assets/icons/menu/overflow-menu.svg";
|
|
import { ReactComponent as JsToggleIcon } from "assets/icons/control/js-toggle.svg";
|
|
import { ReactComponent as IncreaseIcon } from "assets/icons/control/increase.svg";
|
|
import { ReactComponent as DecreaseIcon } from "assets/icons/control/decrease.svg";
|
|
|
|
import { ReactComponent as DraggableIcon } from "assets/icons/control/draggable.svg";
|
|
import { ReactComponent as CloseIcon } from "assets/icons/control/close.svg";
|
|
import { ReactComponent as PickMyLocationIcon } from "assets/icons/control/pick-my-location.svg";
|
|
/* eslint-disable react/display-name */
|
|
|
|
export const ControlIcons: {
|
|
[id: string]: JSXElementConstructor<IconProps>;
|
|
} = {
|
|
DELETE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<DeleteIcon />
|
|
</IconWrapper>
|
|
),
|
|
MOVE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<MoveIcon />
|
|
</IconWrapper>
|
|
),
|
|
EDIT_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<EditIcon />
|
|
</IconWrapper>
|
|
),
|
|
VIEW_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<ViewIcon />
|
|
</IconWrapper>
|
|
),
|
|
MORE_VERTICAL_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<MoreVerticalIcon />
|
|
</IconWrapper>
|
|
),
|
|
MORE_HORIZONTAL_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<OverflowMenuIcon />
|
|
</IconWrapper>
|
|
),
|
|
JS_TOGGLE: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<JsToggleIcon />
|
|
</IconWrapper>
|
|
),
|
|
INCREASE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<IncreaseIcon />
|
|
</IconWrapper>
|
|
),
|
|
DECREASE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<DecreaseIcon />
|
|
</IconWrapper>
|
|
),
|
|
DRAGGABLE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<DraggableIcon />
|
|
</IconWrapper>
|
|
),
|
|
CLOSE_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<CloseIcon />
|
|
</IconWrapper>
|
|
),
|
|
PICK_MY_LOCATION_CONTROL: (props: IconProps) => (
|
|
<IconWrapper {...props}>
|
|
<PickMyLocationIcon />
|
|
</IconWrapper>
|
|
),
|
|
};
|
|
|
|
export type ControlIconName = keyof typeof ControlIcons;
|