diff --git a/compass/app/auth/forgot_password/page.tsx b/compass/app/auth/forgot_password/page.tsx
index b2e7c9c..9b0e37e 100644
--- a/compass/app/auth/forgot_password/page.tsx
+++ b/compass/app/auth/forgot_password/page.tsx
@@ -41,10 +41,9 @@ export default function Page() {
title="Enter your email address"
placeholder="janedoe@gmail.com"
value={confirmEmail}
- iconKey={'EmailInputIcon'}
+ icon={'EmailInputIcon'}
onChange={(e) => {
setconfirmEmail(e.target.value);
-
}}/>
{emailError && (
diff --git a/compass/app/auth/newPassword/page.tsx b/compass/app/auth/newPassword/page.tsx
index 81e2056..506da4e 100644
--- a/compass/app/auth/newPassword/page.tsx
+++ b/compass/app/auth/newPassword/page.tsx
@@ -1,8 +1,11 @@
// pages/index.tsx
"use client";
import { useState, useEffect } from 'react';
+
+import Input from '@/components/Input';
+
import Button from '@/components/Button';
-import Input from '@/components/Input1';
+
import Paper from '@/components/auth/Paper';
diff --git a/compass/app/page.tsx b/compass/app/page.tsx
index 1d7b132..07191a7 100644
--- a/compass/app/page.tsx
+++ b/compass/app/page.tsx
@@ -1,5 +1,6 @@
// pages/index.tsx
"use client";
+
import Button from '@/components/Button';
import Input from '@/components/Input'
import InlineLink from '@/components/InlineLink';
@@ -52,7 +53,7 @@ export default function Page() {
/>
Login
-
+
diff --git a/compass/components/Input.tsx b/compass/components/Input.tsx
index 5997296..b74302a 100644
--- a/compass/components/Input.tsx
+++ b/compass/components/Input.tsx
@@ -1,41 +1,33 @@
-import { Icons } from '@/utils/constants';
-import React, { FunctionComponent, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
+import React, { FunctionComponent, InputHTMLAttributes, ReactNode, ChangeEvent } from 'react';
type InputProps = InputHTMLAttributes
& {
- iconKey?: keyof typeof Icons; // Use keyof typeof to ensure the key exists in Icons
- title?: string; // Assuming title is always a string
- type?: string;
- placeholder?: string;
+ icon?: ReactNode;
+ title?: ReactNode;
+ type?:ReactNode;
+ placeholder?:ReactNode
+ valid?:boolean;
+ onChange: (event: ChangeEvent) => void;
};
-const Input: FunctionComponent = ({ iconKey, type, title, placeholder, ...rest }) => {
- const IconComponent = iconKey ? Icons[iconKey] : null;
-
+const Input: FunctionComponent = ({ icon, type, title, placeholder, onChange, valid = true, ...rest }) => {
return (
-
- {title && (
-
-
-
- )}
-
- {IconComponent && (
-
-
-
- )}
-
-
-
+
+
+
);
};
diff --git a/compass/components/Input1.tsx b/compass/components/Input1.tsx
deleted file mode 100644
index 0517a01..0000000
--- a/compass/components/Input1.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import React, { FunctionComponent, InputHTMLAttributes, ReactNode, ChangeEvent } from 'react';
-
-type InputProps = InputHTMLAttributes & {
- icon?: ReactNode;
- title?: ReactNode;
- type?:ReactNode;
- placeholder?:ReactNode
- valid?:boolean;
- onChange: (event: ChangeEvent) => void;
-};
-
-const Input: FunctionComponent = ({ icon, type, title, placeholder, onChange, valid, ...rest }) => {
- return (
-
-
-
- );
-};
-
-export default Input;
diff --git a/compass/components/InputOld.tsx b/compass/components/InputOld.tsx
new file mode 100644
index 0000000..5997296
--- /dev/null
+++ b/compass/components/InputOld.tsx
@@ -0,0 +1,42 @@
+import { Icons } from '@/utils/constants';
+import React, { FunctionComponent, InputHTMLAttributes, ReactElement, ReactNode } from 'react';
+
+type InputProps = InputHTMLAttributes & {
+ iconKey?: keyof typeof Icons; // Use keyof typeof to ensure the key exists in Icons
+ title?: string; // Assuming title is always a string
+ type?: string;
+ placeholder?: string;
+};
+
+const Input: FunctionComponent = ({ iconKey, type, title, placeholder, ...rest }) => {
+ const IconComponent = iconKey ? Icons[iconKey] : null;
+
+ return (
+
+ {title && (
+
+
+
+ )}
+
+ {IconComponent && (
+
+
+
+ )}
+
+
+
+ );
+};
+
+export default Input;