Rev 189 | AutorÃa | Ultima modificación | Ver Log |
import React from "react";
import styled from "styled-components";
const StyledInput = styled.div`
align-items: center;
background-color: #eef3f0;
border-radius: var(--border-radius);
color: gray;
cursor: pointer;
display: flex;
min-height: 1.5rem;
padding: 0.5rem;
width: -webkit-fill-available;
transition: all 0.2s;
input {
border: none;
outline: none;
background: none;
width: 100%;
}
`;
const SearchInput = ({
icon: Icon,
type = "text",
placeholder = "",
className = "",
...rest
}) => {
return (
<StyledInput className={className}>
{Icon && <Icon />}
<input type={type} placeholder={placeholder} {...rest} />
</StyledInput>
);
};
export default SearchInput;