Skip to content

MegaMenuIcon

The icon for a menu item's icon key, decorative beside its label. Renders nothing for no key, no set, or a key the set does not have, so a CMS value the site has no glyph for leaves the label as it is. Server-renderable.

import { MegaMenuIcon } from "@evolve-storefront/layout/mega-menu-icons";

Preview

Site SetOpen in Storybook ↗

Usage

Every icon in a site's set, with its name.

<MegaMenuIcon name={item.icon} icons={icons} className="size-5" />;

Props

PropTypeDescription
namestring | null | undefined
icons?Readonly<Record<string, ComponentType<SVGProps<SVGSVGElement>>>>
className?string

Examples

Unknown NameA name the set does not have renders nothing, so the label stands alone.
<MegaMenuIcon name="rocket" icons={icons} />;
Open in Storybook ↗