Skip to content

Commit

Permalink
#540549 | [SXA][Headless] Missing classes for navigation component (#…
Browse files Browse the repository at this point in the history
…1082)

(cherry picked from commit 1d3e3b1)
  • Loading branch information
alan-null authored and ambrauer committed Jul 11, 2022
1 parent 29c8d01 commit 6cc780c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type NavigationProps = {
params?: { [key: string]: string };
fields: Fields;
handleClick: () => void;
relativeLevel: number;
};

const getNavigationText = function (props: NavigationProps): JSX.Element | string {
Expand Down Expand Up @@ -65,6 +66,7 @@ export const Default = (props: NavigationProps): JSX.Element => {
key={`${key}${element.Id}`}
fields={element}
handleClick={() => handleToggleMenu(false)}
relativeLevel={1}
/>
));
const styles =
Expand Down Expand Up @@ -107,12 +109,13 @@ const NavigationList = (props: NavigationProps) => {
key={`${index}${element.Id}`}
fields={element}
handleClick={props.handleClick}
relativeLevel={props.relativeLevel + 1}
/>
));
}

return (
<li className={props.fields.Styles.join(' ')} key={props.fields.Id}>
<li className={props.fields.Styles.concat('rel-level' + props.relativeLevel).join(' ')} key={props.fields.Id}>
<div className="navigation-title">
<Link field={getLinkField(props)} title={title} onClick={props.handleClick}>
{getNavigationText(props)}
Expand Down

0 comments on commit 6cc780c

Please sign in to comment.