From b1f2f881bae3dbb7d3f8f8e8dc1dea09d0702034 Mon Sep 17 00:00:00 2001 From: sam-m-m Date: Wed, 21 Oct 2020 15:27:45 -0700 Subject: [PATCH] chore #127: Add IconKeys enum --- src/components/Icon/IconsMap.ts | 26 ++++++++++++++++++++++---- src/components/Icon/index.tsx | 8 +++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/Icon/IconsMap.ts b/src/components/Icon/IconsMap.ts index 7691ff70..548271d6 100644 --- a/src/components/Icon/IconsMap.ts +++ b/src/components/Icon/IconsMap.ts @@ -2,18 +2,36 @@ import { ReactComponent as APP_STORE } from '../assets/icons/app-store.svg' import { ReactComponent as AWS } from '../assets/icons/aws.svg' import { ReactComponent as AZURE } from '../assets/icons/azure.svg' import { ReactComponent as DASSANA } from '../assets/icons/dassana.svg' -import { ReactComponent as GOOGLE_CLOUD } from '../assets/icons/google-cloud.svg' +import { ReactComponent as GITHUB } from '../assets/icons/github.svg' +import { ReactComponent as GOOGLE_CLOUD_PLATFORM } from '../assets/icons/google-cloud-platform.svg' import { ReactComponent as QUERY_SERVICE } from '../assets/icons/query-service.svg' +import { ReactComponent as SALESFORCE } from '../assets/icons/salesforce.svg' +import { ReactComponent as ZOOM } from '../assets/icons/zoom.svg' const Icons = { appStore: APP_STORE, aws: AWS, azure: AZURE, dassana: DASSANA, - 'google-cloud': GOOGLE_CLOUD, - queryService: QUERY_SERVICE + github: GITHUB, + googleCloudService: GOOGLE_CLOUD_PLATFORM, + queryService: QUERY_SERVICE, + salesforce: SALESFORCE, + zoom: ZOOM } +export default Icons + export type IconName = keyof typeof Icons -export default Icons +export enum IconKeys { + appStore = 'appStore', + aws = 'aws', + azure = 'azure', + dassana = 'dassana', + github = 'github', + googleCloudService = 'googleCloudService', + queryService = 'queryService', + salesforce = 'salesforce', + zoom = 'zoom' +} diff --git a/src/components/Icon/index.tsx b/src/components/Icon/index.tsx index 54f915c5..b29e45a0 100644 --- a/src/components/Icon/index.tsx +++ b/src/components/Icon/index.tsx @@ -1,8 +1,6 @@ -import Icons, { IconName } from './IconsMap' +import Icons, { IconKeys, IconName } from './IconsMap' import React, { FC } from 'react' -export type { IconName } - export interface SharedIconProps { /** * The height of the icon, in pixels. Width will be calculated by default. @@ -43,3 +41,7 @@ export const Icon: FC = ({ height = 32, ...props }: IconProps) => { return {icon} } + +export type { IconName } + +export { IconKeys }