diff --git a/app/components/Input.tsx b/app/components/Input.tsx index 52f585c..02b157c 100644 --- a/app/components/Input.tsx +++ b/app/components/Input.tsx @@ -1,30 +1,31 @@ +import { cn } from "@/app/lib/cn"; import { SearchNormal } from "iconsax-reactjs"; -import { forwardRef } from "react"; +import { FC } from "react"; export type InputVariant = "primary" | "search"; type Props = { variant?: InputVariant; + className?: string; } & React.InputHTMLAttributes; -const Input = forwardRef(({ variant = "search", className, type, ...props }, ref) => { - const isSearch = variant === "search"; +const Input: FC = (props) => { + const { variant = "primary", className, ...rest } = props; return (
- {isSearch &&
); -}); - -Input.displayName = "Input"; +}; export default Input; diff --git a/app/components/Seprator.tsx b/app/components/Seprator.tsx new file mode 100644 index 0000000..0e3fc1a --- /dev/null +++ b/app/components/Seprator.tsx @@ -0,0 +1,12 @@ +import { FC } from "react"; +import { cn } from "../lib/cn"; + +type Props = { + className?: string; +}; + +const Seprator: FC = ({ className }) => { + return
; +}; + +export default Seprator; diff --git a/app/lib/cn.ts b/app/lib/cn.ts new file mode 100644 index 0000000..508e935 --- /dev/null +++ b/app/lib/cn.ts @@ -0,0 +1,3 @@ +export function cn(...classes: (string | boolean | undefined | null)[]): string { + return classes.filter(Boolean).join(' ') +}