Skip to content
Snippets Groups Projects
SearchInput.js 571 B
Newer Older
  • Learn to ignore specific revisions
  • import React from "react";
    import { SearchIcon } from "@heroicons/react/outline";
    
    
    SaifFGit's avatar
    SaifFGit committed
    function SearchInput({ onChange }) {
    
      return (
        <div className="relative">
          <input
            className="w-52 h-12 text-base font-semibold outline-none dark:text-white px-3 pr-10 rounded-2xl bg-dark-700"
            placeholder="Search"
            type="text"
    
    SaifFGit's avatar
    SaifFGit committed
            onChange={onChange}
    
          ></input>
          <button className="absolute top-0 right-3 bottom-0 w-6">
            <SearchIcon className="w-6 h-6 dark:text-white" />
          </button>
        </div>
      );
    }
    
    export default SearchInput;