import { NavLink } from 'react-router-dom';
import styles from './LeftSidebar.module.scss';

export type TypeItemProps = {
  title: string;
  path?: string;
  isTitle?: boolean;
};

const LeftSidebarItem = ({
  title,
  path = '#',
  isTitle = false,
}: TypeItemProps): JSX.Element => (
  <span className={styles[isTitle ? 'leftSidebarTitle' : 'leftSidebarItem']}>
    <NavLink to={path}>{title}</NavLink>
  </span>
);

export default LeftSidebarItem;
