1
0
Fork 0
freesewing/sites/dev/components/navigation/modal-menu.mjs

48 lines
1.7 KiB
JavaScript
Raw Normal View History

// Dependencies
import { NavigationContext } from 'shared/context/navigation-context.mjs'
2023-07-15 12:32:17 +02:00
// Hooks
import { useContext } from 'react'
2023-07-15 12:32:17 +02:00
// Components
import { SectionsMenu, ns as sectionsNs } from 'shared/components/navigation/sections-menu.mjs'
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
2023-05-22 19:53:24 +02:00
import { nsMerge } from 'shared/utils.mjs'
import { ChoiceLink } from 'shared/components/choice-link.mjs'
2023-07-16 07:27:51 +02:00
import { NavLinks, Breadcrumbs } from 'shared/components/navigation/sitenav.mjs'
2023-07-15 12:32:17 +02:00
export const ns = nsMerge(sectionsNs)
export const ModalMenu = ({ slug }) => {
// Grab siteNav from the navigation context
const { siteNav } = useContext(NavigationContext)
2023-07-15 12:32:17 +02:00
return (
<ModalWrapper flex="col" justify="top" slideFrom="left">
<div className="max-w-full">
<div
className={`
py-4 w-full m-auto
flex flex-col-reverse gap-0 flex-wrap justify-between
lg:max-w-6xl lg:flex-nowrap lg:gap-8 lg:flex-row
`}
>
<div className="w-full lg:w-1/2">
<SectionsMenu />
<ChoiceLink href="/search" title="Search">
If you cannot find what you are looking for but you know the key words, try our
search.
</ChoiceLink>
<ChoiceLink href="/sitemap" title="Sitemap">
The sitemap lists all pages on this website. It can give you a good idea of what you
can find here.
</ChoiceLink>
</div>
<div className="w-full lg:w-1/2">
<Breadcrumbs {...{ siteNav, slug }} lead />
2023-07-15 12:32:17 +02:00
<NavLinks {...{ siteNav, slug }} />
</div>
</div>
</div>
2023-07-15 12:32:17 +02:00
</ModalWrapper>
)
}