change button functions

This commit is contained in:
luisa.bellitto 2025-06-24 13:47:13 +02:00 committed by Rudi Regentonne
parent d0d879336e
commit 8136e95c6a
7 changed files with 88 additions and 33 deletions

View file

@ -3,15 +3,16 @@ import "./buttonRotkehlchen.css";
interface ButtonPrimaryProps {
style: "primary" | "secondary";
label: string;
type: "button" | "submit" | "reset";
onClick?: () => void;
}
export default function ButtonPrimary({ style, label, onClick }: ButtonPrimaryProps) {
export default function ButtonPrimary({ style, label, type, onClick }: ButtonPrimaryProps) {
return (
<>
{style === "primary" && (
<button
type="submit"
type={type}
className="button-primary body-m"
onClick={onClick}
>