Fixes icon selected color

This commit is contained in:
Tom Moor 2017-11-10 11:45:40 -08:00
parent 45137721d4
commit 1b0edb7c1e
2 changed files with 6 additions and 2 deletions

View File

@ -116,6 +116,7 @@ type CollectionLinkProps = {
key={collection.id}
to={collection.url}
icon={<CollectionIcon expanded={expanded} color={collection.color} />}
iconColor={collection.color}
>
<Flex justify="space-between">
{collection.name}

View File

@ -43,8 +43,10 @@ const StyledNavLink = styled(NavLink)`
}
&.active {
svg {
fill: ${activeStyle.color}
${IconWrapper} & {
svg {
fill: ${({ iconColor }) => (iconColor ? iconColor : activeStyle.color)}
}
}
}
`;
@ -58,6 +60,7 @@ type Props = {
icon?: React$Element<*>,
expand?: boolean,
expandedContent?: React$Element<*>,
iconColor?: string,
};
@observer class SidebarLink extends Component {