-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e0a7e2
commit b1f83a6
Showing
5 changed files
with
156 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"use client"; | ||
|
||
import { Accordion, AccordionItem, Link, ScrollShadow } from "@nextui-org/react"; | ||
import { ReactNode } from "react"; | ||
import LinkNext from "next/link"; | ||
|
||
export interface ChapterProps { | ||
items: { href: string; label: string }[]; | ||
} | ||
|
||
const Chapter = ({ items }: ChapterProps) => { | ||
return ( | ||
<ScrollShadow | ||
orientation="vertical" | ||
className="flex flex-col h-[calc(100dvh-128px)] sticky top-[64px] w-[256px] pt-5" | ||
> | ||
<nav className="pl-2 pb-2"> | ||
<ul className="flex flex-col gap-y-4"> | ||
<li> | ||
<Link as={LinkNext} href="/add-payment-methods" className="text-black opacity-80" scroll> | ||
Introduction | ||
</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
<Accordion showDivider={false} isCompact className="w-full" defaultExpandedKeys="0"> | ||
<AccordionItem key={0} aria-label="Accordion 0" title="Usage"> | ||
<nav className="pl-6 pb-2"> | ||
<ul className="flex flex-col gap-y-4"> | ||
{items.map((item) => ( | ||
<li> | ||
<Link | ||
as={LinkNext} | ||
href={item.href} | ||
className="text-black opacity-80" | ||
key={item.label} | ||
scroll | ||
> | ||
{item.label} | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</nav> | ||
</AccordionItem> | ||
</Accordion> | ||
</ScrollShadow> | ||
); | ||
}; | ||
|
||
export default Chapter; |