From 1b0edb7c1e1d247127909d1e9bb611c88c2b12a5 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 10 Nov 2017 11:45:40 -0800 Subject: [PATCH] Fixes icon selected color --- app/components/Layout/components/SidebarCollections.js | 1 + app/components/Layout/components/SidebarLink.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/components/Layout/components/SidebarCollections.js b/app/components/Layout/components/SidebarCollections.js index 77b0f670b..6b5ae7c37 100644 --- a/app/components/Layout/components/SidebarCollections.js +++ b/app/components/Layout/components/SidebarCollections.js @@ -116,6 +116,7 @@ type CollectionLinkProps = { key={collection.id} to={collection.url} icon={} + iconColor={collection.color} > {collection.name} diff --git a/app/components/Layout/components/SidebarLink.js b/app/components/Layout/components/SidebarLink.js index 3171b3da5..910e24cbc 100644 --- a/app/components/Layout/components/SidebarLink.js +++ b/app/components/Layout/components/SidebarLink.js @@ -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 {