From 64752f624b5d15775612aefd508e26797ca4e37d Mon Sep 17 00:00:00 2001 From: wil Date: Mon, 1 Apr 2024 18:09:24 -0400 Subject: [PATCH] login ui done --- app/components/Input.tsx | 34 ++++++--- app/components/Typography.tsx | 10 +++ app/components/index.tsx | 4 +- .../comps/SidePanelTabs/TabStylization.tsx | 3 +- app/routes/IdealEnigma.tsx | 35 --------- app/routes/Login.tsx | 52 ++++++++++++++ app/routes/Signup.tsx | 71 +++++++++++++++++++ 7 files changed, 160 insertions(+), 49 deletions(-) create mode 100644 app/routes/Login.tsx create mode 100644 app/routes/Signup.tsx diff --git a/app/components/Input.tsx b/app/components/Input.tsx index 18554df835..f91fc05864 100644 --- a/app/components/Input.tsx +++ b/app/components/Input.tsx @@ -1,21 +1,35 @@ -import React from "react"; +import { twMerge } from "tailwind-merge"; +import { IconDefinition } from "@fortawesome/pro-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + +import { Label } from "."; interface InputProps extends React.InputHTMLAttributes { label?: string; className?: string; + icon?: IconDefinition } -export function Input({ label, className, ...rest }: InputProps) { +export function Input({label, icon, className, ...rest }: InputProps) { return ( -
- {label && ( - - )} +
+ {label && } - +
+ {icon && ( + + )} + +
); } diff --git a/app/components/Typography.tsx b/app/components/Typography.tsx index f2c0bda536..121e9527e3 100644 --- a/app/components/Typography.tsx +++ b/app/components/Typography.tsx @@ -1,3 +1,4 @@ +import { NavLink, NavLinkProps } from "@remix-run/react"; import { twMerge } from "tailwind-merge"; interface TypogProps { @@ -27,5 +28,14 @@ export const H5 = ({className,children,}:TypogProps)=> export const H6 = ({className,children,}:TypogProps)=>
{children}
; +export const Link = ({className, ...rest}:NavLinkProps)=> + + export const P = ({className,children,}:TypogProps)=>

{children}

; \ No newline at end of file diff --git a/app/components/index.tsx b/app/components/index.tsx index d3c627d58c..8b3be492ec 100644 --- a/app/components/index.tsx +++ b/app/components/index.tsx @@ -4,7 +4,7 @@ import { ButtonLink } from "./ButtonLink"; import { ButtonIconSelect } from "./ButtonIconSelect"; import { Input } from "./Input"; import { InputVector } from "./InputVector"; -import { H1, H2, H3, H4, H5, H6, P, Label} from "./Typography"; +import { H1, H2, H3, H4, H5, H6, P, Label, Link} from "./Typography"; import { ItemPicker } from "./ItemPicker"; import { Textarea } from "./Textarea"; import { LoadingBar } from "./LoadingBar"; @@ -15,7 +15,7 @@ export { ButtonIcon, ButtonLink, ButtonIconSelect, - H1,H2,H3,H4,H5,H6,P,Label, + H1,H2,H3,H4,H5,H6,P,Label,Link, ItemPicker, Textarea, Input, diff --git a/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx b/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx index 2c8b6df66f..c03f4fca06 100644 --- a/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx +++ b/app/pages/PageEnigma/comps/SidePanelTabs/TabStylization.tsx @@ -8,8 +8,7 @@ import { } from "~/components" import { AppUiContext } from '../../contexts/AppUiContext'; -import { APPUI_ACTION_TYPES } from '../../reducers'; -import { APPUI_VIEW_MODES } from '../../reducers'; +import { APPUI_ACTION_TYPES, APPUI_VIEW_MODES } from '../../reducers'; import { EngineContext } from '../../contexts/EngineContext'; import { ArtStyle } from '../../js/api_manager'; export const TabStylization = ()=>{ diff --git a/app/routes/IdealEnigma.tsx b/app/routes/IdealEnigma.tsx index 6fe36a7f25..087f2297a7 100644 --- a/app/routes/IdealEnigma.tsx +++ b/app/routes/IdealEnigma.tsx @@ -1,40 +1,5 @@ -import { useState } from "react"; import { PageEnigma } from "../pages/PageEnigma"; -import { Button } from "~/components/Button"; - export default function IdealEnigma() { - //const [riddle, setRiddle] = useState(""); - //const [submitted, setSubmitted] = useState(false); - - //const handleInput = (event:React.ChangeEvent)=>{ - // setRiddle(event.target.value); - //} - - //const handleSubmit = () => { - // const state = riddle.length > 5 && riddle[riddle.length-1] === "!"; - // setSubmitted(state); - //} - return ; - // if(submitted){ - // return - // }else{ - // return( - //
- //
- // - // - //
- // - //
- //
- - // ); - // } } diff --git a/app/routes/Login.tsx b/app/routes/Login.tsx new file mode 100644 index 0000000000..1a4cea5173 --- /dev/null +++ b/app/routes/Login.tsx @@ -0,0 +1,52 @@ +import { Form } from "@remix-run/react"; +import { faKey, faUser } from "@fortawesome/pro-solid-svg-icons"; +import { + Button, + H1, + Input, + Link, + P, +} from '~/components'; + +export default function LoginScreen() { + return ( +
+
+

Login to FakeYou

+
+
+
+ +
+ +
+
+

Don't have an account?

+ Sign Up +
+ +
+
+
+ ); +} diff --git a/app/routes/Signup.tsx b/app/routes/Signup.tsx new file mode 100644 index 0000000000..4cf1646bc2 --- /dev/null +++ b/app/routes/Signup.tsx @@ -0,0 +1,71 @@ +import { Form } from "@remix-run/react"; +import { faEnvelope, faKey, faUser } from "@fortawesome/pro-solid-svg-icons"; +import { + Button, + H1, + Input, + Link, + P, +} from '~/components'; + +export default function LoginScreen() { + return ( +
+
+

Sign Up to FakeYou

+
+
+
+ +
+ +
+ +
+ +
+
+ +
+
+

Already have an account?

+ Log in instead +
+
+
+
+ ); +}