You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/sidebar/SidebarSection.tsx

27 lines
488 B

import { PropsWithChildren, ReactNode } from 'react';
import styles from './SidebarSection.module.css';
interface Props {
title: ReactNode;
label?: string;
}
export function SidebarSection({
title,
label,
children,
}: PropsWithChildren<Props>) {
const labelText = typeof title === 'string' ? title : label;
return (
<>
<li className={styles.sidebarTitle}>{title}</li>
<nav aria-label={labelText}>
<ul>{children}</ul>
</nav>
</>
);
}