diff --git a/compass/app/auth/forgot_password/page.tsx b/compass/app/auth/forgot_password/page.tsx index 3401b20..9b0e37e 100644 --- a/compass/app/auth/forgot_password/page.tsx +++ b/compass/app/auth/forgot_password/page.tsx @@ -44,7 +44,6 @@ export default function Page() { icon={'EmailInputIcon'} onChange={(e) => { setconfirmEmail(e.target.value); - // setEmailError(''); // Reset the error when the user types }}/> {emailError && (

diff --git a/compass/app/auth/newPassword/page.tsx b/compass/app/auth/newPassword/page.tsx index 96e4603..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 Button from '@/components/Button1'; + import Input from '@/components/Input'; + +import Button from '@/components/Button'; + import Paper from '@/components/auth/Paper'; diff --git a/compass/app/page.tsx b/compass/app/page.tsx index 1587bc0..07191a7 100644 --- a/compass/app/page.tsx +++ b/compass/app/page.tsx @@ -1,8 +1,7 @@ // pages/index.tsx "use client"; -// import Button from '@/components/Button49'; -import Button from '@/components/Button1'; +import Button from '@/components/Button'; import Input from '@/components/Input' import InlineLink from '@/components/InlineLink'; import Paper from '@/components/auth/Paper'; diff --git a/compass/components/Button1.tsx b/compass/components/Button1.tsx deleted file mode 100644 index bf6dd55..0000000 --- a/compass/components/Button1.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { FunctionComponent, ReactNode } from 'react'; - -type ButtonProps = { - children: ReactNode; - onClick?: () => void; // make the onClick handler optional - type?: "button" | "submit" | "reset"; // specify possible values for type - disabled?: boolean; -}; - -const Button: FunctionComponent = ({ children, type, disabled, onClick }) => { - const buttonClassName = `inline-block rounded border ${disabled ? 'bg-gray-400 text-gray-600 cursor-not-allowed' : 'border-purple-600 bg-purple-600 text-white hover:bg-transparent hover:text-purple-600 focus:outline-none focus:ring active:text-purple-500'} px-12 py-3 text-sm font-semibold`; - return ( - - ); -}; - -export default Button; diff --git a/compass/components/auth/EmailInput.tsx b/compass/components/auth/EmailInput.tsx new file mode 100644 index 0000000..cb3a829 --- /dev/null +++ b/compass/components/auth/EmailInput.tsx @@ -0,0 +1,17 @@ +import React, { useState } from 'react'; +import Input from '@/components/Input' +import { InputProps } from '@/utils/classes/InputProps'; + +const EmailInput: React.FunctionComponent = ({ type, title, placeholder, ...rest }) => { + + return ( + + ); +}; + +export default EmailInput; diff --git a/compass/tsconfig.json b/compass/tsconfig.json index c714696..1acc222 100644 --- a/compass/tsconfig.json +++ b/compass/tsconfig.json @@ -8,7 +8,7 @@ "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/compass/utils/classes/InputProps.ts b/compass/utils/classes/InputProps.ts new file mode 100644 index 0000000..2354d62 --- /dev/null +++ b/compass/utils/classes/InputProps.ts @@ -0,0 +1,9 @@ +import { InputHTMLAttributes } from "react"; +import { Icons } from "../constants"; + +export 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; + }; \ No newline at end of file