Skip to content
Snippets Groups Projects
Commit e860ebf6 authored by Aggarwal Himanshu's avatar Aggarwal Himanshu
Browse files

Make Input components modular

parent 4d6d280f
No related branches found
No related tags found
2 merge requests!17Merge develop into main,!15Modular components
......@@ -2,6 +2,7 @@ import classNames from "classnames";
import React from "react";
function Input({
className,
placeholder,
type,
onChange,
......@@ -26,7 +27,8 @@ function Input({
"pr-8": symbolRight,
"pl-3": !symbolLeft,
"pl-8": symbolLeft,
}
},
className
)}
placeholder={placeholder}
type={type ? type : "text"}
......
import React from "react";
import { SearchIcon } from "@heroicons/react/outline";
import Input from "./Input";
function SearchInput({ onChange }) {
return (
<div className="relative">
<input
<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"
onChange={onChange}
></input>
<button className="absolute top-0 right-3 bottom-0 w-6">
<SearchIcon className="w-6 h-6 dark:text-white" />
</button>
symbolRight={<SearchIcon className="w-6 h-6 dark:text-white" />}
></Input>
</div>
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment