From b40746f5427dba9b31eb0b79864bd8c64bd1e5c9 Mon Sep 17 00:00:00 2001 From: cgraha217 Date: Sun, 11 Dec 2022 06:20:30 -0700 Subject: [PATCH] fix(@porrtal/r-shell-material): fix banner key and banner menu icons --- apps/n/porrtal-io-app/page-data/data.ts | 7 ++++--- apps/n/porrtal-io-app/pages/react/quick-start/index.tsx | 2 +- apps/n/porrtal-io-app/pages/react/samples/index.tsx | 2 +- libs/porrtal/r-shell-material/src/lib/banner/banner.tsx | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/n/porrtal-io-app/page-data/data.ts b/apps/n/porrtal-io-app/page-data/data.ts index 42228c2f..f692c335 100644 --- a/apps/n/porrtal-io-app/page-data/data.ts +++ b/apps/n/porrtal-io-app/page-data/data.ts @@ -53,14 +53,15 @@ export const getAngularUiLibrary = (): string => { return 'material'; } -export const getBannerData = (): BannerData => { +export const getBannerData = (reactUiLibrary: string): BannerData => { + const displayIcon = reactUiLibrary === 'blueprint' ? 'hurricane' : 'cyclone'; return { displayText: 'porrtal.io', - displayIcon: 'hurricane', + displayIcon: displayIcon, childData: [ { key: 'porrtal.io', - displayIcon: 'hurricane', + displayIcon: displayIcon, displayText: 'porrtal.io', targetUrl: '/', }, diff --git a/apps/n/porrtal-io-app/pages/react/quick-start/index.tsx b/apps/n/porrtal-io-app/pages/react/quick-start/index.tsx index c2d6df75..3ba47b33 100644 --- a/apps/n/porrtal-io-app/pages/react/quick-start/index.tsx +++ b/apps/n/porrtal-io-app/pages/react/quick-start/index.tsx @@ -40,7 +40,7 @@ export function QuickStart(props: QuickStartProps) { }, []); const quickStartBannerData = { - ...getBannerData(), + ...getBannerData(reactUiLibrary), displayText: `quick-start ${reactUiLibrary ? '(' : ''}${reactUiLibrary}${ reactUiLibrary ? ')' : '' }`, diff --git a/apps/n/porrtal-io-app/pages/react/samples/index.tsx b/apps/n/porrtal-io-app/pages/react/samples/index.tsx index 6acfed04..6f243a7e 100644 --- a/apps/n/porrtal-io-app/pages/react/samples/index.tsx +++ b/apps/n/porrtal-io-app/pages/react/samples/index.tsx @@ -38,7 +38,7 @@ export function Samples(props: SamplesProps) { }, []); const quickStartBannerData = { - ...getBannerData(), + ...getBannerData(reactUiLibrary), displayText: `samples ${reactUiLibrary ? '(' : ''}${reactUiLibrary}${ reactUiLibrary ? ')' : '' }`, diff --git a/libs/porrtal/r-shell-material/src/lib/banner/banner.tsx b/libs/porrtal/r-shell-material/src/lib/banner/banner.tsx index d109333a..c9244d94 100644 --- a/libs/porrtal/r-shell-material/src/lib/banner/banner.tsx +++ b/libs/porrtal/r-shell-material/src/lib/banner/banner.tsx @@ -94,7 +94,7 @@ function BannerMenu(props: BannerProps & { children: ReactNode | undefined }) { > {props.bannerData.childData.map((menuItem) => ( {menuItem.displayIcon && {menuItem.displayIcon}}