Skip to content

Commit

Permalink
extend clickable area to entire sidebar item area
Browse files Browse the repository at this point in the history
  • Loading branch information
Damola18 committed Jan 14, 2025
1 parent c4ad81f commit 959d677
Showing 1 changed file with 29 additions and 33 deletions.
62 changes: 29 additions & 33 deletions src/components/dashboard/sidebar-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,25 @@ export const SidebarItem = (props: SidebarItemProps) => {

return (
<LinkBox {...rest}>
<Flex
h="40px"
align="center"
pl={{ base: 5, lg: '15' }}
cursor="pointer"
data-active={dataAttr(isActiveRoute)}
color="grayText"
fontWeight="medium"
_hover={{
bg: 'divider',
color: 'dimmedText',
}}
_active={{
bg: 'hoverBg',
color: 'brandText',
}}
transition="all .2s ease"
role="group"
>
<LinkOverlay
href={item.route}
target={item.target}
onClick={onClose}
<LinkOverlay href={item.route} target={item.target} onClick={onClose}>
<Flex
h="40px"
align="center"
pl={{ base: 5, lg: '15' }}
cursor="pointer"
data-active={dataAttr(isActiveRoute)}
color="grayText"
fontWeight="medium"
_hover={{
bg: 'divider',
color: 'dimmedText',
}}
_active={{
bg: 'hoverBg',
color: 'brandText',
}}
transition="all .2s ease"
role="group"
display="flex"
gap="2"
>
Expand All @@ -55,15 +51,15 @@ export const SidebarItem = (props: SidebarItemProps) => {
<Icon as={item.icon} boxSize="6" />
)}
{t(item.label)}
</LinkOverlay>
<NavIndicator
display="none"
_groupActive={{
display: 'inherit',
}}
ml="auto"
/>
</Flex>
<NavIndicator
display="none"
_groupActive={{
display: 'inherit',
}}
ml="auto"
/>
</Flex>
</LinkOverlay>
</LinkBox>
)
}
}

0 comments on commit 959d677

Please sign in to comment.