further NFS icon migration and alignment
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -172,6 +172,7 @@ function NavContentRenderer(props: {
|
||||
// We want the priority: page (config/params) -> nav item -> plugin -> pluginId
|
||||
const resolvedTitle = node.instance.getData(coreExtensionData.title);
|
||||
const pluginTitle = node.spec.plugin.title;
|
||||
const pluginIcon = node.spec.plugin.icon;
|
||||
const pluginId = node.spec.plugin.pluginId;
|
||||
const hasExplicitPageTitle =
|
||||
resolvedTitle !== undefined &&
|
||||
@@ -194,6 +195,8 @@ function NavContentRenderer(props: {
|
||||
icon = <NavItemIcon />;
|
||||
} else if (resolvedIcon) {
|
||||
icon = resolvedIcon;
|
||||
} else if (pluginIcon) {
|
||||
icon = pluginIcon;
|
||||
}
|
||||
|
||||
if (!title || !icon) {
|
||||
|
||||
@@ -45,7 +45,15 @@ export const IconsApi = ApiBlueprint.makeWithOverrides({
|
||||
return new DefaultIconsApi(
|
||||
inputs.icons
|
||||
.map(i => i.get(IconBundleBlueprint.dataRefs.icons))
|
||||
.reduce((acc, bundle) => ({ ...acc, ...bundle }), defaultIcons),
|
||||
.reduce(
|
||||
(acc, bundle) => ({ ...acc, ...bundle }),
|
||||
Object.fromEntries(
|
||||
Object.entries(defaultIcons).map(([key, Icon]) => [
|
||||
key,
|
||||
<Icon />,
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
}),
|
||||
Reference in New Issue
Block a user