Skip to content

Commit

Permalink
feat: better toolbox icons color
Browse files Browse the repository at this point in the history
  • Loading branch information
singuerinc committed Oct 8, 2018
1 parent 42b0adf commit a910ea1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
14 changes: 12 additions & 2 deletions app/components/miniToolbox/MiniToolboxIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ import * as React from 'react';
import { icons } from 'feather-icons';
import styled from 'styled-components';

const Wrapper = styled.span`
const Wrapper = styled.span<{ active: boolean }>`
display: flex;
svg {
stroke: ${({ active }) => (active ? 'white !important' : '#202A2D')};
}
`;

export const MiniToolboxIcon = ({ icon }: { icon: string }) => (
export const MiniToolboxIcon = ({
icon,
active = false
}: {
icon: string;
active?: boolean;
}) => (
<Wrapper
active={active}
dangerouslySetInnerHTML={{
__html: icons[icon].toSvg()
}}
Expand Down
10 changes: 6 additions & 4 deletions app/components/miniToolbox/MiniToolboxItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Tooltip from 'tooltip.js';
injectGlobal`
.tooltip {
position: absolute;
background: #111;
background: #030F12;
color: #eee;
width: auto;
border-radius: 3px;
Expand Down Expand Up @@ -47,18 +47,20 @@ injectGlobal`
`;

export const Element = styled.li`
background-color: #111;
background-color: #111111;
color: #f4f4f4;
display: inline-block;
text-align: center;
justify-content: center;
padding: 6px 8px;
margin: 0;
transition: background-color 300ms ease;
transition: background-color 100ms ease;
&:hover {
cursor: pointer;
background-color: #333;
svg {
stroke: #999;
}
}
`;

Expand Down
2 changes: 1 addition & 1 deletion app/components/toolbox/ToolboxItemDumb.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

export const ToolboxItemDumb = styled.li`
background-color: #333;
background-color: #111;
display: flex;
flex: 1 1 auto;
text-align: center;
Expand Down

0 comments on commit a910ea1

Please sign in to comment.