add edit button to edit the bio

This commit is contained in:
luisa.bellitto 2025-06-21 20:16:36 +02:00 committed by Rudi Regentonne
parent 23858b1374
commit d7852067ff
4 changed files with 47 additions and 25 deletions

View 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>
);
}

View 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);
}

View file

@ -1,6 +1,8 @@
import "./loginAndSignUpPage.css";
import { useEffect, useState } from "react";
import axios from "axios";
import { Button } from "@mui/material";
import ButtonPrimary from "../components/ButtonPrimary";
type FormData = {
username: string;
@ -134,11 +136,7 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
</div>
)}
</div>
<input
type="submit"
className="login-button body-m"
value={signup ? "Sign up" : "Login"}
></input>
<ButtonPrimary value={signup ? "Sign Up" : "Login"} />
<div className="login-signup body-m" onClick={toggleLogin}>
{signup
? "Already have an account? "

View file

@ -58,29 +58,9 @@
}
.login-button {
display: inline-flex;
padding: auto;
justify-content: center;
align-items: center;
gap: 10px;
width: 150px;
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 {