basic login ui
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
.heading {
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.loginInput {
|
||||
margin-bottom: 12px;
|
||||
border: white 1px solid;
|
||||
}
|
||||
|
||||
.submitButton {
|
||||
background-color: #4CAF50; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
"use client";
|
||||
import styles from "./login.module.css";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function LoginPage() {
|
||||
const [username, setUsername] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
function handleSubmit(e: React.MouseEvent<HTMLButtonElement>) {
|
||||
e.preventDefault();
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1 className={styles.heading}>Login</h1>
|
||||
<form>
|
||||
<label>
|
||||
Username:
|
||||
<input className={styles.loginInput} type="text" name="username" value={username} onChange={(e) => setUsername(e.target.value)} />
|
||||
</label>
|
||||
<br />
|
||||
<label>
|
||||
Password:
|
||||
<input
|
||||
className={styles.loginInput}
|
||||
type="password"
|
||||
name="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
</label>
|
||||
<br />
|
||||
<button className={styles.submitButton} type="submit" onClick={handleSubmit}>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+3
-1
@@ -16,7 +16,9 @@
|
||||
"node": ">=22.17.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lightsaver": "workspace:*"
|
||||
"lightsaver": "workspace:*",
|
||||
"@apollo/client": "^3.13.8",
|
||||
"graphql": "^16.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"pnpm": "^10.13.1",
|
||||
|
||||
Generated
+6
@@ -8,6 +8,12 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@apollo/client':
|
||||
specifier: ^3.13.8
|
||||
version: 3.13.8(@types/react@19.1.8)(graphql@16.11.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
graphql:
|
||||
specifier: ^16.11.0
|
||||
version: 16.11.0
|
||||
lightsaver:
|
||||
specifier: workspace:*
|
||||
version: 'link:'
|
||||
|
||||
Reference in New Issue
Block a user