mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
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>
24 lines
763 B
TypeScript
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;
|
|
};
|