Files
helix-engage/src/components/application/app-navigation/config.ts
saridsa2 631acf63dc fix: pass data-icon prop through FontAwesome icon wrappers
Replaced all bare `FC<{ className?: string }>` and `FC<HTMLAttributes<...>>`
wrappers that only forwarded `className` with `faIcon()` from
`src/lib/icon-wrapper.ts`, ensuring props like `data-icon` needed by the
Button component's CSS selector `*:data-icon:size-5` are correctly forwarded.
Also widened `NavItemBaseProps.icon` and `NavItemType.icon` prop types to
`FC<Record<string, any>>` to stay compatible with `faIcon()` return type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 11:19:46 +05:30

24 lines
763 B
TypeScript

import type { FC, ReactNode } from "react";
export type NavItemType = {
/** Label text for the nav item. */
label: string;
/** URL to navigate to when the nav item is clicked. */
href?: string;
/** Icon component to display. */
icon?: FC<Record<string, any>>;
/** Badge to display. */
badge?: ReactNode;
/** List of sub-items to display. */
items?: { label: string; href: string; icon?: FC<Record<string, any>>; badge?: ReactNode }[];
/** Whether this nav item is a divider. */
divider?: boolean;
};
export type NavItemDividerType = Omit<NavItemType, "icon" | "label" | "divider"> & {
/** Label text for the divider. */
label?: string;
/** Whether this nav item is a divider. */
divider: true;
};