import { Box, Button, createStyles, getStylesRef, Menu, NavLink, } from '@mantine/core'; import { Link } from 'react-router-dom'; import { NavLinkProps } from '@/configs/links'; import Icon from '../Icon'; const useStyles = createStyles((theme) => ({ link: { color: theme.colorScheme === 'dark' ? theme.colors.gray[0] : theme.colors.gray[7], [`&.${getStylesRef('isActive')}`]: { color: theme.colors[theme.primaryColor][7], }, }, isActive: { ref: getStylesRef('isActive'), }, })); const NavbarLink: React.FC = ({ subLinks, ...props }) => { const { label, href, isActive, icon, isVertical, iconName } = props; const { classes, cx } = useStyles(); if (isVertical) { return ( el.isActive)} > {subLinks?.map((item) => { return ( ); })} ); } if (subLinks && subLinks.length > 0) { return ( {subLinks?.map((item) => { return ( {item.label} ); })} ); } return ( ); }; export default NavbarLink;