Skip to content

Commit

Permalink
Correctly size legacy nav 3rd party icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Yasonik committed Jun 23, 2020
1 parent 1cdeec0 commit 43f60ef
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/public/chrome/ui/header/nav_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { EuiImage } from '@elastic/eui';
import { EuiIcon } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { ChromeNavLink, ChromeRecentlyAccessedHistoryItem, CoreStart } from '../../..';
Expand All @@ -28,10 +28,6 @@ function isModifiedEvent(event: React.MouseEvent<HTMLButtonElement, MouseEvent>)
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}

function LinkIcon({ url }: { url: string }) {
return <EuiImage size="s" alt="" aria-hidden={true} url={url} />;
}

interface Props {
link: ChromeNavLink;
legacyMode: boolean;
Expand Down Expand Up @@ -85,7 +81,8 @@ export function createEuiListItem({
'data-test-subj': dataTestSubj,
...(basePath && {
iconType: euiIconType,
icon: !euiIconType && icon ? <LinkIcon url={basePath.prepend(`/${icon}`)} /> : undefined,
icon:
!euiIconType && icon ? <EuiIcon type={basePath.prepend(`/${icon}`)} size="m" /> : undefined,
}),
};
}
Expand Down

0 comments on commit 43f60ef

Please sign in to comment.