diff --git a/assets/images/icon-action-transfer-16x16@2x.png b/assets/images/icon-action-transfer-16x16@2x.png
deleted file mode 100644
index bf0eef45fa..0000000000
Binary files a/assets/images/icon-action-transfer-16x16@2x.png and /dev/null differ
diff --git a/assets/images/icon-check-purple-32x32@2x.png b/assets/images/icon-check-purple-32x32@2x.png
deleted file mode 100644
index ca0be63a31..0000000000
Binary files a/assets/images/icon-check-purple-32x32@2x.png and /dev/null differ
diff --git a/assets/images/icon-delete-vibrant-blue-12x14@2x.png b/assets/images/icon-delete-vibrant-blue-12x14@2x.png
deleted file mode 100644
index 3e641b815e..0000000000
Binary files a/assets/images/icon-delete-vibrant-blue-12x14@2x.png and /dev/null differ
diff --git a/assets/images/icon-edit-columns-16x16@2x.png b/assets/images/icon-edit-columns-16x16@2x.png
deleted file mode 100644
index b6e88ad63c..0000000000
Binary files a/assets/images/icon-edit-columns-16x16@2x.png and /dev/null differ
diff --git a/assets/images/icon-more-menu-3x13@2x.png b/assets/images/icon-more-menu-3x13@2x.png
deleted file mode 100644
index f59c5f1d1d..0000000000
Binary files a/assets/images/icon-more-menu-3x13@2x.png and /dev/null differ
diff --git a/frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx b/frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx
index 843c18850d..89f2918b8c 100644
--- a/frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx
+++ b/frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx
@@ -3,12 +3,9 @@ import { kebabCase, noop } from "lodash";
import PremiumFeatureIconWithTooltip from "components/PremiumFeatureIconWithTooltip";
import { ButtonVariant } from "components/buttons/Button/Button";
+import Icon from "components/Icon/Icon";
+import { IconNames } from "components/icons";
import Button from "../../../buttons/Button";
-import CloseIcon from "../../../../../assets/images/icon-close-vibrant-blue-16x16@2x.png";
-import DeleteIcon from "../../../../../assets/images/icon-delete-vibrant-blue-12x14@2x.png";
-import CheckIcon from "../../../../../assets/images/icon-action-check-16x15@2x.png";
-import DisableIcon from "../../../../../assets/images/icon-action-disable-14x14@2x.png";
-import TransferIcon from "../../../../../assets/images/icon-action-transfer-16x16@2x.png";
const baseClass = "action-button";
export interface IActionButtonProps {
@@ -18,7 +15,7 @@ export interface IActionButtonProps {
targetIds?: number[]; // TODO figure out undefined case
variant?: ButtonVariant;
hideButton?: boolean | ((targetIds: number[]) => boolean);
- icon?: string;
+ iconSvg?: IconNames;
iconPosition?: string;
indicatePremiumFeature?: boolean;
}
@@ -42,31 +39,12 @@ const ActionButton = (buttonProps: IActionButtonProps): JSX.Element | null => {
targetIds = [],
variant = "brand",
hideButton,
- icon,
+ iconSvg,
iconPosition,
indicatePremiumFeature,
} = buttonProps;
const onButtonClick = useActionCallback(onActionButtonClick || noop);
- const iconLink = ((iconProp) => {
- // check if using pre-defined short-hand otherwise otherwise return the prop
- switch (iconProp) {
- case "close":
- return CloseIcon;
- case "remove":
- return CloseIcon;
- case "delete":
- return DeleteIcon;
- case "check":
- return CheckIcon;
- case "disable":
- return DisableIcon;
- case "transfer":
- return TransferIcon;
- default:
- return null;
- }
- })(icon);
// hideButton is intended to provide a flexible way to specify show/hide conditions via a boolean or a function that evaluates to a boolean
// currently it is typed to accept an array of targetIds but this typing could easily be expanded to include other use cases
const isHidden = (
@@ -81,6 +59,7 @@ const ActionButton = (buttonProps: IActionButtonProps): JSX.Element | null => {
if (isHidden(hideButton)) {
return null;
}
+
return (
{indicatePremiumFeature && (
@@ -92,13 +71,9 @@ const ActionButton = (buttonProps: IActionButtonProps): JSX.Element | null => {
variant={variant}
>
<>
- {iconPosition === "left" && iconLink && (
-

- )}
+ {iconPosition === "left" && iconSvg &&
}
{buttonText}
- {iconPosition !== "left" && iconLink && (
-

- )}
+ {iconPosition !== "left" && iconSvg &&
}
>
diff --git a/frontend/components/TableContainer/DataTable/DataTable.tsx b/frontend/components/TableContainer/DataTable/DataTable.tsx
index e0c77a57fe..91afc1f899 100644
--- a/frontend/components/TableContainer/DataTable/DataTable.tsx
+++ b/frontend/components/TableContainer/DataTable/DataTable.tsx
@@ -372,7 +372,7 @@ const DataTable = ({
targetIds,
variant,
hideButton,
- icon,
+ iconSvg,
iconPosition,
indicatePremiumFeature,
} = actionButtonProps;
@@ -387,7 +387,7 @@ const DataTable = ({
variant={variant}
hideButton={hideButton}
indicatePremiumFeature={indicatePremiumFeature}
- icon={icon}
+ iconSvg={iconSvg}
iconPosition={iconPosition}
/>
@@ -408,7 +408,7 @@ const DataTable = ({
onActionButtonClick: primarySelectAction?.onActionButtonClick || noop,
targetIds,
variant: primarySelectAction?.variant,
- icon: primarySelectAction?.icon,
+ iconSvg: primarySelectAction?.iconSvg,
};
return !buttonText ? null : renderActionButton(actionProps);
diff --git a/frontend/components/TableContainer/TableContainer.tsx b/frontend/components/TableContainer/TableContainer.tsx
index c0fab7d5c4..81d182a80c 100644
--- a/frontend/components/TableContainer/TableContainer.tsx
+++ b/frontend/components/TableContainer/TableContainer.tsx
@@ -8,7 +8,7 @@ import SearchField from "components/forms/fields/SearchField";
// @ts-ignore
import Pagination from "components/Pagination";
import Button from "components/buttons/Button";
-import { ButtonVariant } from "components/buttons/Button/Button";
+import Icon from "components/Icon/Icon";
import DataTable from "./DataTable/DataTable";
import TableContainerUtils from "./TableContainerUtils";
@@ -337,11 +337,8 @@ const TableContainer = ({
>
<>
{actionButton.buttonText}
- {actionButton.icon && (
-
+ {actionButton.iconSvg && (
+
)}
>
diff --git a/frontend/components/buttons/ActionButtons/ActionButtons.tsx b/frontend/components/buttons/ActionButtons/ActionButtons.tsx
index dc993b03e2..eee6911e29 100644
--- a/frontend/components/buttons/ActionButtons/ActionButtons.tsx
+++ b/frontend/components/buttons/ActionButtons/ActionButtons.tsx
@@ -7,8 +7,6 @@ import DropdownButton from "components/buttons/DropdownButton";
import Icon from "components/Icon/Icon";
import { IconNames } from "components/icons";
-import MoreIcon from "../../../../assets/images/icon-more-menu-3x13@2x.png";
-
export interface IActionButtonProps {
type: "primary" | "secondary";
label: string;
@@ -65,6 +63,9 @@ const ActionButtons = ({ baseClass, actions }: IProps): JSX.Element => {
@@ -79,12 +80,7 @@ const ActionButtons = ({ baseClass, actions }: IProps): JSX.Element => {
options={secondaryActions}
variant="text-icon"
>
- More options{" "}
-
+ More options
diff --git a/frontend/components/buttons/ActionButtons/_styles.scss b/frontend/components/buttons/ActionButtons/_styles.scss
index b1eb037e69..0fa87ee5af 100644
--- a/frontend/components/buttons/ActionButtons/_styles.scss
+++ b/frontend/components/buttons/ActionButtons/_styles.scss
@@ -13,9 +13,8 @@
}
&__secondary-dropdown {
- .more-options-icon {
- padding-left: $pad-small;
- padding-right: $pad-medium;
+ .icon {
+ padding-left: 6px;
}
.dropdown-button {
margin-left: $pad-large;
diff --git a/frontend/components/icons/Columns.tsx b/frontend/components/icons/Columns.tsx
new file mode 100644
index 0000000000..ecbe56e7ed
--- /dev/null
+++ b/frontend/components/icons/Columns.tsx
@@ -0,0 +1,32 @@
+import React from "react";
+import { COLORS, Colors } from "styles/var/colors";
+import { ICON_SIZES, IconSizes } from "styles/var/icon_sizes";
+
+interface IColumnsProps {
+ color?: Colors;
+ size?: IconSizes;
+}
+
+const Columns = ({
+ color = "core-fleet-blue",
+ size = "medium",
+}: IColumnsProps) => {
+ return (
+
+ );
+};
+
+export default Columns;
diff --git a/frontend/components/icons/Copy.tsx b/frontend/components/icons/Copy.tsx
index f30b9fd442..d261244514 100644
--- a/frontend/components/icons/Copy.tsx
+++ b/frontend/components/icons/Copy.tsx
@@ -8,7 +8,6 @@ interface ICopy {
}
const Copy = ({ color = "core-fleet-blue", size = "medium" }: ICopy) => {
- console.log("color for this icon", color);
return (