PromucFlow_constructor/app/client/src/icons/ControlIcons.tsx

124 lines
3.9 KiB
TypeScript
Raw Normal View History

import React, { JSXElementConstructor } 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";
import { ReactComponent as JsToggleIcon } from "assets/icons/control/js-toggle.svg";
2020-04-15 11:42:11 +00:00
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";
2020-05-28 18:10:26 +00:00
import { ReactComponent as HelpIcon } from "assets/icons/control/help.svg";
import { ReactComponent as CollapseIcon } from "assets/icons/control/collapse.svg";
import { ReactComponent as PickMyLocationSelectedIcon } from "assets/icons/control/pick-location-selected.svg";
2020-06-10 17:31:20 +00:00
import { ReactComponent as SettingsIcon } from "assets/icons/control/settings.svg";
import { ReactComponent as DragIcon } from "assets/icons/control/drag.svg";
import { ReactComponent as SortIcon } from "assets/icons/control/sort-icon.svg";
import PlayIcon from "assets/icons/control/play-icon.png";
2020-06-10 17:31:20 +00:00
/* 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>
),
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>
),
JS_TOGGLE: (props: IconProps) => (
<IconWrapper {...props}>
<JsToggleIcon />
</IconWrapper>
),
2020-04-15 11:42:11 +00:00
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_SELECTED_CONTROL: (props: IconProps) => (
2020-04-15 11:42:11 +00:00
<IconWrapper {...props}>
<PickMyLocationSelectedIcon />
2020-04-15 11:42:11 +00:00
</IconWrapper>
),
2020-06-10 17:31:20 +00:00
SETTINGS_CONTROL: (props: IconProps) => (
2020-05-22 11:03:35 +00:00
<IconWrapper {...props}>
2020-06-10 17:31:20 +00:00
<SettingsIcon />
2020-05-22 11:03:35 +00:00
</IconWrapper>
),
2020-05-28 18:10:26 +00:00
HELP_CONTROL: (props: IconProps) => (
<IconWrapper {...props}>
<HelpIcon />
</IconWrapper>
),
PLAY_VIDEO: (props: IconProps) => (
2020-06-22 13:46:19 +00:00
<IconWrapper {...props}>
<img
src={PlayIcon}
style={{ height: "30px", width: "30px" }}
alt="Datasource"
/>
2020-06-22 13:46:19 +00:00
</IconWrapper>
),
DRAG_CONTROL: (props: IconProps) => (
<IconWrapper {...props}>
<DragIcon />
</IconWrapper>
),
COLLAPSE_CONTROL: (props: IconProps) => (
<IconWrapper {...props}>
<CollapseIcon />
</IconWrapper>
),
SORT_CONTROL: (props: IconProps) => (
<IconWrapper {...props}>
<SortIcon />
</IconWrapper>
),
};
2019-11-21 10:52:49 +00:00
export type ControlIconName = keyof typeof ControlIcons;