Design Start
This commit is contained in:
1 parent
b5a088cf9c
commit
dfe4ab50f3
57 files changed
+478
-141
No files matched your search
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import React, { CSSProperties } from 'react';
|
||||
import styles from "@/css/OldButton.module.css";
|
||||
import clsx from 'clsx';
|
||||
|
||||
interface OldButtonProps {
|
||||
children?: string;
|
||||
long?: boolean;
|
||||
red?: boolean;
|
||||
disabled?: boolean;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
onAction?: () => void;
|
||||
};
|
||||
|
||||
export default function OldButton({children, long=true, red=true, disabled=false, className, style, onAction}: OldButtonProps) {
|
||||
return (
|
||||
<button
|
||||
className={clsx(styles["button"], disabled && styles["button-disabled"], className)}
|
||||
style={style}
|
||||
onClick={(disabled ? undefined : onAction)}
|
||||
disabled={disabled}
|
||||
>
|
||||
<img
|
||||
src={
|
||||
red ?
|
||||
long ? "/buttons/Button_rot_lang.webp" : "/buttons/Button_rot_kurz.webp"
|
||||
:
|
||||
long ? "/buttons/Button_blau_lang.webp" : "/buttons/Button_blau_kurz.webp"
|
||||
}
|
||||
alt={"Button Background"}
|
||||
className={styles["image"]}
|
||||
/>
|
||||
<span className={clsx(styles["label"], "lancelot-regular", disabled && styles["label-disabled"])}>
|
||||
{children}
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user