Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Classname Prop to Base Layout #68

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/components/MegaMenuLayout/MegaMenuLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Bars3Icon } from "@heroicons/react/24/outline";
import type { ClassValue } from "clsx";
import React, { useState } from "react";
import { useMenuItems } from "../../hooks/useMenuItems";
import { NavMenuGroup } from "../../types/megamenu";
import { DEFAULT_URL } from "../../util/constants";
import { cx } from "../../util/cx";
import { CustomLink } from "../CustomLink";
import DesktopMenu from "../DesktopMenu/DesktopMenu";
import { Logo } from "../Logo";
Expand All @@ -11,6 +13,7 @@ import { PhoneButton } from "../PhoneButton";
import { Search } from "../Search";

export type MegaMenuWrapperProps = {
className?: ClassValue;
menuBarItems?: NavMenuGroup[];
url?: string;
subtitle?: string;
Expand All @@ -30,6 +33,7 @@ type Title = {
};

const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({
className = "",
tagline,
title,
url,
Expand All @@ -46,7 +50,12 @@ const MegaMenuLayout: React.FC<MegaMenuWrapperProps> = ({

return (
<>
<div className="relative z-10 flex w-full items-center justify-center sm:h-[120px]">
<div
className={cx(
className,
"relative z-10 flex w-full items-center justify-center sm:h-[120px]",
)}
>
<nav
className="flex h-full w-full items-center justify-between gap-x-4 overflow-hidden px-0"
aria-label="Global"
Expand Down
Loading