Commit 7b09ec89 authored by tom's avatar tom

fix clicks

parent 160fb865
...@@ -22,34 +22,35 @@ const NavLink = ({ text, pathname, icon, isCollapsed }: Props) => { ...@@ -22,34 +22,35 @@ const NavLink = ({ text, pathname, icon, isCollapsed }: Props) => {
return ( return (
<NextLink href={ pathname } passHref> <NextLink href={ pathname } passHref>
<Tooltip
label={ text } <Link
hasArrow={ false } as="li"
isDisabled={ !isCollapsed } listStyleType="none"
placement="right" w={ isCollapsed ? '60px' : '180px' }
variant="nav" px={ isCollapsed ? '15px' : 3 }
gutter={ 0 } py={ 2.5 }
color={ isActive ? colors.text.active : colors.text.hover } color={ isActive ? colors.text.active : colors.text.default }
bgColor={ isActive ? colors.bg.active : colors.bg.default }
_hover={{ color: isActive ? colors.text.active : colors.text.hover }}
borderRadius="base"
whiteSpace="nowrap"
{ ...getDefaultTransitionProps({ transitionProperty: 'width, padding' }) }
> >
<Link <Tooltip
as="li" label={ text }
listStyleType="none" hasArrow={ false }
w={ isCollapsed ? '60px' : '180px' } isDisabled={ !isCollapsed }
px={ isCollapsed ? '15px' : 3 } placement="right"
py={ 2.5 } variant="nav"
color={ isActive ? colors.text.active : colors.text.default } gutter={ 15 }
bgColor={ isActive ? colors.bg.active : colors.bg.default } color={ isActive ? colors.text.active : colors.text.hover }
_hover={{ color: isActive ? colors.text.active : colors.text.hover }}
borderRadius="base"
whiteSpace="nowrap"
{ ...getDefaultTransitionProps({ transitionProperty: 'width, padding' }) }
> >
<HStack spacing={ 3 }> <HStack spacing={ 3 }>
<Icon as={ icon } boxSize="30px"/> <Icon as={ icon } boxSize="30px"/>
{ !isCollapsed && <Text variant="inherit">{ text }</Text> } { !isCollapsed && <Text variant="inherit">{ text }</Text> }
</HStack> </HStack>
</Link> </Tooltip>
</Tooltip> </Link>
</NextLink> </NextLink>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment