diff --git a/src/custom/TransferModal/TransferList/TransferList.tsx b/src/custom/TransferModal/TransferList/TransferList.tsx index ffaea425..8fe1d302 100644 --- a/src/custom/TransferModal/TransferList/TransferList.tsx +++ b/src/custom/TransferModal/TransferList/TransferList.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Checkbox, Grid, List, ListItem, Typography } from '../../../base'; import { KubernetesIcon, LeftArrowIcon, RightArrowIcon, SMPIcon } from '../../../icons'; +import { MesheryIcon } from '../../../icons/Meshery'; import Tooltip from '../../../patches/Tooltip'; import { ButtonGrid, @@ -15,6 +16,17 @@ export const TRANSFER_COMPONET = { CHIP: 'chip', OTHER: 'other' }; +export function getFallbackImageBasedOnKind(kind: string | undefined): JSX.Element { + if (!kind) { + return ; + } + const fallbackComponents: { [key: string]: JSX.Element } = { + meshery: , + kubernetes: + }; + + return fallbackComponents[kind] || null; +} export interface TransferListProps { name: string; @@ -37,6 +49,7 @@ export interface TransferListProps { interface ListItemType { id: number; name: string; + kind: string | undefined; } function not(a: T[], b: T[]): T[] { @@ -227,7 +240,7 @@ function TransferList({ label={item.name} onDelete={() => {}} deleteIcon={} - icon={} + icon={getFallbackImageBasedOnKind(item?.kind) || } /> ) : ( diff --git a/src/icons/Meshery/MesheryIcon.tsx b/src/icons/Meshery/MesheryIcon.tsx new file mode 100644 index 00000000..c8421126 --- /dev/null +++ b/src/icons/Meshery/MesheryIcon.tsx @@ -0,0 +1,84 @@ +import { FC } from 'react'; +import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants'; +import { CustomIconProps } from '../types'; + +const MesheryIcon: FC = ({ + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + primaryFill = '#00B39F', + secondaryFill = '#00D3A9', + ...props +}) => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default MesheryIcon; diff --git a/src/icons/Meshery/index.ts b/src/icons/Meshery/index.ts new file mode 100644 index 00000000..5e90c5e7 --- /dev/null +++ b/src/icons/Meshery/index.ts @@ -0,0 +1 @@ +export { default as MesheryIcon } from './MesheryIcon';