diff --git a/src/layout/InkLayout/InkLayout.stories.tsx b/src/layout/InkLayout/InkLayout.stories.tsx index 701ec51..b5efb38 100644 --- a/src/layout/InkLayout/InkLayout.stories.tsx +++ b/src/layout/InkLayout/InkLayout.stories.tsx @@ -78,3 +78,24 @@ export const SideNavWithCustomButtons: Story = { ), }, }; + +/** + * The side nav can be a custom component for routing, for instance, if you want to use NextJS' own {``} component. + */ +export const StickySideNav: Story = { + args: { + children: ( + + +
+
+ If the main content is bigger than the screen, the side nav will + be sticky. +
+
Bottom
+
+
+
+ ), + }, +}; diff --git a/src/layout/InkLayout/InkLayout.tsx b/src/layout/InkLayout/InkLayout.tsx index 31a03a2..4d08933 100644 --- a/src/layout/InkLayout/InkLayout.tsx +++ b/src/layout/InkLayout/InkLayout.tsx @@ -34,7 +34,7 @@ export const InkLayout: React.FC = ({ <>
@@ -73,21 +73,30 @@ export const InkLayout: React.FC = ({
{sideNavigation && (
{sideNavigation}
)} - {children} +
+ {children} +
{isMobileNavOpen && ( diff --git a/src/layout/InkParts/InkPageLayout.tsx b/src/layout/InkParts/InkPageLayout.tsx index 3d485e7..8ed4877 100644 --- a/src/layout/InkParts/InkPageLayout.tsx +++ b/src/layout/InkParts/InkPageLayout.tsx @@ -12,7 +12,7 @@ export const InkPageLayout: React.FC = ({ return (