Added login form main
This commit is contained in:
parent
de4063602a
commit
59c04276ac
47
app/app/components/Login/Login.tsx
Normal file
47
app/app/components/Login/Login.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import React, { useState } from "react"
|
||||
import { Flex, FormControl, Input } from "@chakra-ui/react"
|
||||
|
||||
export const Login = (props) => {
|
||||
const [email, setEmail] = useState("")
|
||||
const [password, setPassword] = useState("")
|
||||
|
||||
const handleLogin = () => {
|
||||
// handle login
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Flex flexDirection="column" gap={4} width="auto">
|
||||
<FormControl>
|
||||
<Input
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
placeholder="Email"
|
||||
type="email"
|
||||
value={email}
|
||||
/>
|
||||
</FormControl>
|
||||
|
||||
<FormControl>
|
||||
<Input
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value={password}
|
||||
/>
|
||||
</FormControl>
|
||||
|
||||
<Flex
|
||||
width="100%"
|
||||
color="white"
|
||||
background="chakras.violet"
|
||||
borderRadius={6}
|
||||
cursor="pointer"
|
||||
paddingX={5}
|
||||
paddingY={2}
|
||||
>
|
||||
Login
|
||||
</Flex>
|
||||
</Flex>
|
||||
</>
|
||||
)
|
||||
}
|
21
app/app/routes/login.tsx
Normal file
21
app/app/routes/login.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import { Flex } from "@chakra-ui/react"
|
||||
|
||||
import { Login } from "~/components/Login/Login"
|
||||
|
||||
export default function login() {
|
||||
const template = (
|
||||
<>
|
||||
<Flex
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
width="100%"
|
||||
height="100%"
|
||||
minHeight="100vh"
|
||||
>
|
||||
<Login></Login>
|
||||
</Flex>
|
||||
</>
|
||||
)
|
||||
|
||||
return template
|
||||
}
|
Loading…
Reference in New Issue
Block a user