2019-09-30 20:04:03 +00:00
|
|
|
import React from "react";
|
2019-11-25 05:07:27 +00:00
|
|
|
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";
|
2019-11-21 10:52:49 +00:00
|
|
|
import { ReactComponent as ViewIcon } from "assets/icons/control/view.svg";
|
|
|
|
|
import { ReactComponent as MoreVerticalIcon } from "assets/icons/control/more-vertical.svg";
|
2020-01-24 09:54:40 +00:00
|
|
|
import { ReactComponent as OverflowMenuIcon } from "assets/icons/menu/overflow-menu.svg";
|
2020-02-26 12:44:56 +00:00
|
|
|
import { ReactComponent as JsToggleIcon } from "assets/icons/control/js-toggle.svg";
|
2019-09-30 20:04:03 +00:00
|
|
|
|
|
|
|
|
/* eslint-disable react/display-name */
|
|
|
|
|
|
|
|
|
|
export const ControlIcons: {
|
|
|
|
|
[id: string]: Function;
|
|
|
|
|
} = {
|
|
|
|
|
DELETE_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<DeleteIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
|
|
|
|
MOVE_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<MoveIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2019-10-21 11:40:24 +00:00
|
|
|
EDIT_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<EditIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2019-11-07 04:59:40 +00:00
|
|
|
VIEW_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<ViewIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2019-11-21 10:52:49 +00:00
|
|
|
MORE_VERTICAL_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<MoreVerticalIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2020-01-24 09:54:40 +00:00
|
|
|
MORE_HORIZONTAL_CONTROL: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<OverflowMenuIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2020-02-26 12:44:56 +00:00
|
|
|
JS_TOGGLE: (props: IconProps) => (
|
|
|
|
|
<IconWrapper {...props}>
|
|
|
|
|
<JsToggleIcon />
|
|
|
|
|
</IconWrapper>
|
|
|
|
|
),
|
2019-09-30 20:04:03 +00:00
|
|
|
};
|
2019-11-21 10:52:49 +00:00
|
|
|
|
|
|
|
|
export type ControlIconName = keyof typeof ControlIcons;
|