Skip to content

Commit

Permalink
Merge pull request #112 from SSWConsulting/3317-use-link-for-megamenu…
Browse files Browse the repository at this point in the history
…-icon

🔗Links - Update tagline to use megamenu link component prop
  • Loading branch information
Calinator444 authored Dec 16, 2024
2 parents 68cd20f + 70901af commit f092c6e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions lib/components/MegaMenuLayout/MegaMenuLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@ export type Title = {
tagline?: never;
};

const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({
const MegaMenuContents: React.FC<MegaMenuWrapperProps> = ({
className = "",
tagline,
title,
url,
subtitle,
searchUrl = DEFAULT_URL,
menuBarItems,
linkComponent,
rightSideActionsOverride,
callback,
}) => {
Expand All @@ -72,7 +71,7 @@ const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({

const RightSideActions = rightSideActionsOverride;
return (
<LinkProvider linkComponent={linkComponent}>
<>
<div
className={cx(
className,
Expand Down Expand Up @@ -151,12 +150,23 @@ const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({
) : (
<PhoneButton className="flex-grow pb-4 sm:hidden" />
)}
</LinkProvider>
</>
);
};

const Divider: React.FC = () => {
return <div className="h-4 w-px bg-gray-700/30 sm:block"></div>;
};

const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({
children,
...props
}) => {
return (
<LinkProvider linkComponent={props.linkComponent}>
<MegaMenuContents {...props}>{children}</MegaMenuContents>
</LinkProvider>
);
};

export default MegaMenuLayout;

0 comments on commit f092c6e

Please sign in to comment.