From 331276914371fe66302ef63fe1b4488d2bdbc803 Mon Sep 17 00:00:00 2001 From: TahimiLeonBravo Date: Mon, 16 Nov 2020 12:37:29 -0600 Subject: [PATCH 1/2] fix: theme color on Lookup searchIcon --- src/components/Lookup/icons/searchIcon.js | 77 ++++++++++++---------- src/components/Lookup/index.js | 4 +- src/components/Lookup/styled/searchIcon.js | 9 +++ 3 files changed, 54 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..754d15d9e 100644 --- a/src/components/Lookup/icons/searchIcon.js +++ b/src/components/Lookup/icons/searchIcon.js @@ -2,47 +2,54 @@ import React from 'react'; import PropTypes from 'prop-types'; const SearchIcon = props => { - const { className } = props; + const { className, style } = props; return ( - - - - - - - - - + search + + + + + + + + + + + @@ -53,10 +60,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; From 5c1d2b243f0c20d766c04515ef5c53ec28401048 Mon Sep 17 00:00:00 2001 From: TahimiLeonBravo Date: Sat, 21 Nov 2020 23:38:21 -0600 Subject: [PATCH 2/2] fix: svg --- src/components/Lookup/icons/searchIcon.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Lookup/icons/searchIcon.js b/src/components/Lookup/icons/searchIcon.js index 754d15d9e..552e9c24c 100644 --- a/src/components/Lookup/icons/searchIcon.js +++ b/src/components/Lookup/icons/searchIcon.js @@ -14,7 +14,6 @@ const SearchIcon = props => { xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" > - search