update src/components/SearchBox/index.js

master
mahdi 3 years ago
parent 84b798680d
commit 7de3dfcac0
  1. 7
      src/components/SearchBox/index.js

@ -6,7 +6,7 @@ import zarbedar from "./zarbedar-icon.svg";
const SearchBox = ({ cancleIcon, searchIcon, placeholder, className }) => { const SearchBox = ({ cancleIcon, searchIcon, placeholder, className }) => {
const [activeSearchBox, setActiveSearchBox] = useState(false); const [activeSearchBox, setActiveSearchBox] = useState(false);
return ( return (
<div className={`flex flex-row-reverse items-center relative ml-2`}> <div className={`flex flex-row-reverse items-center relative`}>
{activeSearchBox && ( {activeSearchBox && (
<img <img
src={cancleIcon} src={cancleIcon}
@ -27,7 +27,7 @@ const SearchBox = ({ cancleIcon, searchIcon, placeholder, className }) => {
// onBlur={() => setActiveSearchBox(false)} // onBlur={() => setActiveSearchBox(false)}
type="text" type="text"
placeholder={placeholder} placeholder={placeholder}
className={`${className} focus:outline-none border border-[#B5D6FF] focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`} className={`${className} text-xs focus:outline-none rounded border border-[#B5D6FF] focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`}
/> />
</div> </div>
); );
@ -41,6 +41,5 @@ SearchBox.defaultProps = {
placeholder: "دنبال چه چیزی هستید", placeholder: "دنبال چه چیزی هستید",
className: className: "w-[100%] text-blue-400 bg-[#F9FBFF] placeholder-blue-300",
"w-[15%] text-xs text-blue-400 bg-[#F9FBFF] rounded placeholder-blue-300",
}; };

Loading…
Cancel
Save