From 038b8acc8c88256b36838b2e36ac68a91fbcca6d Mon Sep 17 00:00:00 2001 From: Tahimi Date: Sun, 22 Nov 2020 14:48:50 -0600 Subject: [PATCH] fix: theme color on Lookup searchIcon (#2003) * fix: theme color on Lookup searchIcon * fix: svg --- src/components/Lookup/icons/searchIcon.js | 76 ++++++++++++---------- src/components/Lookup/index.js | 4 +- src/components/Lookup/styled/searchIcon.js | 9 +++ 3 files changed, 53 insertions(+), 36 deletions(-) create mode 100644 src/components/Lookup/styled/searchIcon.js diff --git a/src/components/Lookup/icons/searchIcon.js b/src/components/Lookup/icons/searchIcon.js index 66f100837..552e9c24c 100644 --- a/src/components/Lookup/icons/searchIcon.js +++ b/src/components/Lookup/icons/searchIcon.js @@ -2,47 +2,53 @@ import React from 'react'; import PropTypes from 'prop-types'; const SearchIcon = props => { - const { className } = props; + const { className, style } = props; return ( - - - - - - - - - + + + + + + + + + + + @@ -53,10 +59,12 @@ const SearchIcon = props => { SearchIcon.propTypes = { className: PropTypes.string, + style: PropTypes.object, }; SearchIcon.defaultProps = { className: undefined, + style: undefined, }; export default SearchIcon; diff --git a/src/components/Lookup/index.js b/src/components/Lookup/index.js index bb58b9cb2..ba190b601 100644 --- a/src/components/Lookup/index.js +++ b/src/components/Lookup/index.js @@ -15,13 +15,13 @@ import { import { uniqueId } from '../../libs/utils'; import { UP_KEY, DOWN_KEY, ENTER_KEY, ESCAPE_KEY } from '../../libs/constants'; import withReduxForm from '../../libs/hocs/withReduxForm'; -import SearchIcon from './icons/searchIcon'; import Label from '../Input/label'; import StyledInput from './styled/input'; import StyledContainer from './styled/container'; import StyledInputContainer from './styled/inputContainer'; import StyledSpinner from './styled/spinner'; import StyledOptionsMenu from './styled/optionsMenu'; +import StyledSearchIcon from './styled/searchIcon'; import StyledTextError from '../Input/styled/errorText'; import isScrollPositionAtMenuBottom from './helpers/isScrollPositionAtMenuBottom'; import MenuArrowButton from './menuArrowButton'; @@ -634,7 +634,7 @@ Lookup.defaultProps = { error: null, disabled: false, readOnly: false, - icon: , + icon: , size: 'medium', onChange: () => {}, tabIndex: undefined, diff --git a/src/components/Lookup/styled/searchIcon.js b/src/components/Lookup/styled/searchIcon.js new file mode 100644 index 000000000..a321785be --- /dev/null +++ b/src/components/Lookup/styled/searchIcon.js @@ -0,0 +1,9 @@ +import styled from 'styled-components'; +import SearchIcon from '../icons/searchIcon'; +import attachThemeAttrs from '../../../styles/helpers/attachThemeAttrs'; + +const StyledSearchIcon = attachThemeAttrs(styled(SearchIcon))` + color: ${props => props.palette.text.main}; +`; + +export default StyledSearchIcon;