From 4f4a173734402ea570f9c92b0843a6788c6d366a Mon Sep 17 00:00:00 2001 From: scottybollinger Date: Wed, 18 Nov 2020 14:12:58 -0600 Subject: [PATCH] Update SourceIcon to account for full bleed images --- .../components/shared/source_icon/source_icon.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_icon/source_icon.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_icon/source_icon.tsx index 5b76b568d5415..dec9e25fe2440 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_icon/source_icon.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_icon/source_icon.tsx @@ -6,17 +6,17 @@ import React from 'react'; -// Prefer importing entire lodash library, e.g. import { get } from "lodash" -// eslint-disable-next-line no-restricted-imports -import _camelCase from 'lodash/camelCase'; +import { camelCase } from 'lodash'; import { images } from '../assets/source_icons'; +import { imagesFull } from '../assets/sources_full_bleed'; interface SourceIconProps { serviceType: string; name: string; className?: string; wrapped?: boolean; + fullBleed?: boolean; } export const SourceIcon: React.FC = ({ @@ -24,8 +24,15 @@ export const SourceIcon: React.FC = ({ serviceType, className, wrapped, + fullBleed = false, }) => { - const icon = {name}; + const icon = ( + {name} + ); return wrapped ? (
{icon}