import { ActionIcon, Box, Divider, NavLink, ThemeIcon } from '@mantine/core';
import type { ReactNode } from 'react';
import classes from './LeftSidebar.module.scss';
type LeftSidebarButtonProps = {
id?: string;
activeTab: string;
setActiveTab: (id: string) => void;
label?: string;
leftSection?: ReactNode;
collapse: boolean;
divider?: string;
};
export function LeftSidebarButton({
id,
activeTab,
setActiveTab,
label,
leftSection,
collapse,
divider,
}: LeftSidebarButtonProps) {
if (divider) {
return collapse ? (
) : (
);
}
if (collapse) {
return (
setActiveTab(id)}
>
{leftSection}
);
}
return (
setActiveTab(id)}
leftSection={
{leftSection}
}
/>
);
}