I'm striving to achieve a design similar to this: goalimg
Here's my progress so far: currentimg
In order to have the search icon appear to the left of the placeholder text within this input field, I am utilizing a styled input component in React JavaScript.
This is the CSS style applied to the input:
const SearchBar = styled.input`
color: #000000;
margin-top: 20px;
background: #F2F2F7;
padding-left: 35.33px;
border-radius: 50px;
height: 30px;
border: 1px solid ${props => props.theme.gray2};
padding-top: 7px;
padding-bottom: 7px;
margin-left: 14px;
margin-right: 14px;
outline-width: 1px;
display: flex;
flex-direction: row;
`;
Additionally, here's the relevant code within the render() method:
<SearchBar placeholder="Search Chats"></SearchBar>
Any insights on how to position the image inside the input field next to the placeholder text?