MCPcopy Create free account
hub / github.com/mantinedev/ui.mantine.dev / HeaderMegaMenu

Function HeaderMegaMenu

lib/HeaderMegaMenu/HeaderMegaMenu.tsx:65–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63];
64
65export function HeaderMegaMenu() {
66 const [drawerOpened, { toggle: toggleDrawer, close: closeDrawer }] = useDisclosure(false);
67 const [linksOpened, { toggle: toggleLinks }] = useDisclosure(false);
68 const theme = useMantineTheme();
69
70 const links = mockdata.map((item) => (
71 <UnstyledButton className={classes.subLink} key={item.title}>
72 <Group wrap="nowrap" align="flex-start">
73 <ThemeIcon size={34} variant="default" radius="md">
74 <item.icon size={22} color={theme.colors.blue[6]} />
75 </ThemeIcon>
76 <div>
77 <Text size="sm" fw={500}>
78 {item.title}
79 </Text>
80 <Text size="xs" c="dimmed">
81 {item.description}
82 </Text>
83 </div>
84 </Group>
85 </UnstyledButton>
86 ));
87
88 return (
89 <Box pb={120}>
90 <header className={classes.header}>
91 <Group justify="space-between" h="100%">
92 <MantineLogo size={30} />
93
94 <Group h="100%" gap={0} visibleFrom="sm">
95 <a href="#" className={classes.link}>
96 Home
97 </a>
98 <HoverCard width={600} position="bottom" radius="md" shadow="md" withinPortal>
99 <HoverCard.Target>
100 <a href="#" className={classes.link}>
101 <Center inline>
102 <Box component="span" mr={5}>
103 Features
104 </Box>
105 <IconChevronDown size={16} color={theme.colors.blue[6]} />
106 </Center>
107 </a>
108 </HoverCard.Target>
109
110 <HoverCard.Dropdown style={{ overflow: 'hidden' }}>
111 <Group justify="space-between" px="md">
112 <Text fw={500}>Features</Text>
113 <Anchor href="#" fz="xs">
114 View all
115 </Anchor>
116 </Group>
117
118 <Divider my="sm" />
119
120 <SimpleGrid cols={2} spacing={0}>
121 {links}
122 </SimpleGrid>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected