mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
38 lines
895 B
TypeScript
38 lines
895 B
TypeScript
import React from "react";
|
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
import { Link } from "@redocly/theme/components/Link/Link";
|
|
|
|
interface PageProps {
|
|
description: string;
|
|
link: string;
|
|
}
|
|
|
|
interface NavListProps {
|
|
pages: PageProps[];
|
|
bottomBorder?: boolean;
|
|
}
|
|
|
|
export const NavList: React.FC<NavListProps> = ({
|
|
pages,
|
|
bottomBorder = true,
|
|
}) => {
|
|
const { useTranslate } = useThemeHooks();
|
|
const { translate } = useTranslate();
|
|
return (
|
|
<ul className="nav flex-column">
|
|
{pages.map((useCase, index) => (
|
|
<li className="nav-item" key={useCase.link}>
|
|
<Link
|
|
to={useCase.link}
|
|
className={`nav-link ${
|
|
index === pages.length - 1 && !bottomBorder ? "border-none" : ""
|
|
}`}
|
|
>
|
|
{translate(useCase.description)}
|
|
</Link>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
);
|
|
};
|