Skip to content

Commit

Permalink
Merge branch 'main' into feature/deps-bump-963
Browse files Browse the repository at this point in the history
  • Loading branch information
sabato-galasso authored Apr 10, 2024
2 parents 9f3b575 + 8126a98 commit f7b0a48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/BottomNav/BottomNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export interface BottomNavItemProps extends HTMLAttributes<HTMLLIElement> {
active?: boolean;
/** Indica l'URL a cui puntare (utilizzare o questo o onClick) */
url?: string;
/** Indica il link route a cui l'elemento deve puntare. */
to?: string;
/** Etichetta da associare all'elemento */
label?: string;
/** Testo esplicativo per dispositivi screen reader. */
Expand All @@ -36,6 +38,7 @@ export const BottomNavItem: FC<BottomNavItemProps> = ({
badge,
alert = false,
url,
to,
srText,
iconName = 'it-comment',
label,
Expand All @@ -59,7 +62,7 @@ export const BottomNavItem: FC<BottomNavItemProps> = ({
);
return (
<li {...attributes} data-testid={testId}>
<Tag href={url || link || '#'} className={activeClass} onClick={onLinkClick}>
<Tag href={url || link || '#'} className={activeClass} to={to} onClick={onLinkClick}>
{badgeWrapper}
{alertWrapper}
<Icon icon={iconName} />
Expand Down

0 comments on commit f7b0a48

Please sign in to comment.