UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

19 lines (18 loc) 1.1 kB
/** * CodeAnalizerComment: Updated 2 imports on 2024-09-22 14:49:52 * Update:: import { goToHomePage } to '@mikezimm/fps-core-v7/lib/logic/Links/Navigation;' * Update:: import { IWebpartBannerProps } to '@mikezimm/fps-core-v7/lib/banner/mainReact/IWebpartBannerProps;' */ import * as React from 'react'; import { Icon } from '@fluentui/react/lib/Icon'; import { goToHomePage } from '@mikezimm/fps-core-v7/lib/logic/Links/Navigation'; export function addHomeIcon(nearElements, bannerProps) { if (bannerProps.onHomePage !== true && bannerProps.showGoToHome === true) { let titleHome = 'Go to Home Page of current site'; //This is the easy fix that assumes the page is not in a folder in site pages. nearElements.push(React.createElement("div", { style: { paddingRight: undefined }, className: '', title: titleHome }, React.createElement(Icon, { iconName: 'Home', onClick: () => goToHomePage(bannerProps.context.pageContext), style: bannerProps.bannerCmdReactCSS }))); } return nearElements; } //# sourceMappingURL=goHomeIcon.js.map