diff --git a/client/common/Icons.jsx b/client/common/Icons.jsx index 66a72c94..06f18895 100644 --- a/client/common/Icons.jsx +++ b/client/common/Icons.jsx @@ -1,11 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; +import styled from 'styled-components'; +import { remSize, prop } from '../theme'; import SortArrowUp from '../images/sort-arrow-up.svg'; import SortArrowDown from '../images/sort-arrow-down.svg'; import Github from '../images/github.svg'; import Google from '../images/google.svg'; import Plus from '../images/plus-icon.svg'; import Close from '../images/close.svg'; +import Exit from '../images/exit.svg'; import DropdownArrow from '../images/down-filled-triangle.svg'; // HOC that adds the right web accessibility props @@ -15,16 +18,33 @@ import DropdownArrow from '../images/down-filled-triangle.svg'; // Need to add size to these - like small icon, medium icon, large icon. etc. function withLabel(SvgComponent) { const Icon = (props) => { + const StyledIcon = styled(SvgComponent)` + &&& { + color: ${prop('Icon.default')}; + & g, & path, & polygon { + opacity: 1; + fill: ${prop('Icon.default')}; + } + &:hover { + color: ${prop('Icon.hover')}; + & g, & path, & polygon { + opacity: 1; + fill: ${prop('Icon.hover')}; + } + } + } + `; + const { 'aria-label': ariaLabel } = props; if (ariaLabel) { - return (); } - return ( { + const StyledIcon = styled(SvgComponent)` + &&& { + color: ${prop('Icon.default')}; + & g, & path, & polygon { + opacity: 1; + fill: ${prop('Icon.default')}; + } + &:hover { + color: ${prop('Icon.hover')}; + & g, & path, & polygon { + opacity: 1; + fill: ${prop('Icon.hover')}; + } + } + } + `; + const { 'aria-label': ariaLabel } = props; if (ariaLabel) { - return (); } - return ( {
- +

{project.name}

diff --git a/client/theme.js b/client/theme.js index 5215dd99..561fd835 100644 --- a/client/theme.js +++ b/client/theme.js @@ -85,6 +85,10 @@ export default { border: grays.middleLight, }, }, + Icon: { + default: grays.middleGray, + hover: grays.darker + } }, [Theme.dark]: { colors, @@ -113,6 +117,10 @@ export default { border: grays.middleDark, }, }, + Icon: { + default: grays.middleLight, + hover: grays.lightest + } }, [Theme.contrast]: { colors, @@ -141,5 +149,9 @@ export default { border: grays.middleDark, }, }, + Icon: { + default: grays.mediumLight, + hover: colors.yellow + } }, };