-
-
- {/*{headerChildren &&
}*/}
-
+
+
+
+
-
-
-
- {footerChildren}
-
-
-
-
+
+
+ {footerChildren}
+
+
+
+
+
);
};
diff --git a/src/components/layout/main-layout/main-layout.stories.tsx b/src/components/layout/main-layout/main-layout.stories.tsx
index 1b12f21..86983a7 100644
--- a/src/components/layout/main-layout/main-layout.stories.tsx
+++ b/src/components/layout/main-layout/main-layout.stories.tsx
@@ -12,7 +12,7 @@ export default {
component: MainLayoutComponent,
};
-export const Primary = {
+export const MainLayout = {
args: {
headerChildren: (
<>
@@ -96,3 +96,76 @@ export const Primary = {
),
},
};
+
+export const MainLayoutHeadless = {
+ args: {
+ navigatorChildren: (
+ <>
+
}>
+ Home
+
+
}>
+ Hotels
+
+
}>
+ Hotels
+
+
}>
+ Hotels or not hotels
+
+ >
+ ),
+ children: (
+ <>
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
+ content1111111111111111111111111111111111111 1 1111kj hn1kjh1jkh
+ kjh1jkh 1hjk 1khj 1kjh1 hkj 1khjkh1j khj 1 sdf ;lkmjds fpkjlosdjklf
+ jklsdfjkl sdjklf jksldfj klsdfjklsdjlkf
+
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+
content
+
+ >
+ ),
+ footerChildren: (
+ <>
+
Manifest
+
Report a bug
+
Run your own hotel
+
Terms and conditions
+ >
+ ),
+ },
+};
diff --git a/src/components/layout/navigation/nav-item/nav-item.component.tsx b/src/components/layout/navigation/nav-item/nav-item.component.tsx
index aa2a5b0..8ba5938 100644
--- a/src/components/layout/navigation/nav-item/nav-item.component.tsx
+++ b/src/components/layout/navigation/nav-item/nav-item.component.tsx
@@ -5,6 +5,7 @@ import styles from "./nav-item.module.scss";
import { cn } from "../../../../utils";
import type { BoxProps } from "../../../../components";
import { ButtonComponent } from "../../../../components";
+import { useLayout } from "../../../../hooks";
type Props = {
className?: string;
@@ -20,11 +21,14 @@ export const NavItemComponent: React.FC
= ({
children,
...props
}) => {
+ const { toggleNavigator } = useLayout();
+
return (
{icon}
{children}
diff --git a/src/components/layout/navigation/navigator/navigator.component.tsx b/src/components/layout/navigation/navigator/navigator.component.tsx
index 7a04f6c..b5702e5 100644
--- a/src/components/layout/navigation/navigator/navigator.component.tsx
+++ b/src/components/layout/navigation/navigator/navigator.component.tsx
@@ -1,15 +1,22 @@
import * as React from "react";
// @ts-ignore
-import styles from "./navigation.module.scss";
+import styles from "./navigator.module.scss";
// @ts-ignore
import image from "../../../../../assets/logo.png";
+import { useLayout } from "../../../../hooks";
+import { cn } from "../../../../utils";
type Props = {} & React.HTMLProps;
export const NavigatorComponent: React.FC = ({ children }) => {
+ const { openNavigator } = useLayout();
return (
-