mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
add edit button to edit the bio
This commit is contained in:
parent
69d866e2b6
commit
59357e92fe
4 changed files with 47 additions and 25 deletions
18
code/frontend/src/components/ButtonPrimary.tsx
Normal file
18
code/frontend/src/components/ButtonPrimary.tsx
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import "./buttonPrimary.css";
|
||||||
|
|
||||||
|
interface ButtonPrimaryProps {
|
||||||
|
value: string;
|
||||||
|
onClick?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ButtonPrimary({ value, onClick }: ButtonPrimaryProps) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="login-button body-m"
|
||||||
|
onClick={onClick}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
26
code/frontend/src/components/buttonPrimary.css
Normal file
26
code/frontend/src/components/buttonPrimary.css
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
.login-button {
|
||||||
|
display: inline-flex;
|
||||||
|
padding: auto;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding-left: 1rem;
|
||||||
|
padding-right: 1rem;
|
||||||
|
width: fit-content;
|
||||||
|
|
||||||
|
margin: 1rem;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid var(--Rotkehlchen-orange-default);
|
||||||
|
background: var(--Rotkehlchen-yellow-default);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-button:hover {
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid var(--Rotkehlchen-orange-default);
|
||||||
|
background: var(--Rotkehlchen-yellow-hover);
|
||||||
|
}
|
||||||
|
.login-button:active {
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid var(--Rotkehlchen-orange-default);
|
||||||
|
background: var(--Rotkehlchen-orange-default);
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
import "./loginAndSignUpPage.css";
|
import "./loginAndSignUpPage.css";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import { Button } from "@mui/material";
|
||||||
|
import ButtonPrimary from "../components/ButtonPrimary";
|
||||||
|
|
||||||
type FormData = {
|
type FormData = {
|
||||||
username: string;
|
username: string;
|
||||||
|
@ -134,11 +136,7 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<input
|
<ButtonPrimary value={signup ? "Sign Up" : "Login"} />
|
||||||
type="submit"
|
|
||||||
className="login-button body-m"
|
|
||||||
value={signup ? "Sign up" : "Login"}
|
|
||||||
></input>
|
|
||||||
<div className="login-signup body-m" onClick={toggleLogin}>
|
<div className="login-signup body-m" onClick={toggleLogin}>
|
||||||
{signup
|
{signup
|
||||||
? "Already have an account? "
|
? "Already have an account? "
|
||||||
|
|
|
@ -58,29 +58,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-button {
|
.login-button {
|
||||||
display: inline-flex;
|
|
||||||
padding: auto;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 2px solid var(--Rotkehlchen-orange-default);
|
|
||||||
background: var(--Rotkehlchen-yellow-default);
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-button:hover {
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 2px solid var(--Rotkehlchen-orange-default);
|
|
||||||
background: var(--Rotkehlchen-yellow-hover);
|
|
||||||
}
|
|
||||||
.login-button:active {
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 2px solid var(--Rotkehlchen-orange-default);
|
|
||||||
background: var(--Rotkehlchen-orange-default);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-div-input {
|
.login-div-input {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue