undo button

This commit is contained in:
Alexander Bentkamp
2023-01-30 15:15:39 +01:00
parent fbdc1afe34
commit 45f88cf5a8
8 changed files with 109 additions and 61 deletions
+3 -2
View File
@@ -3,12 +3,13 @@ import { Link, LinkProps } from "react-router-dom";
export interface ButtonProps extends LinkProps {
disabled?: boolean
inverted?: boolean
}
export function Button(props: ButtonProps) {
if (props.disabled) {
return <span className="btn btn-disabled" {...props}>{props.children}</span>
return <span className={`btn btn-disabled ${props.inverted ? 'btn-inverted' : ''}`} {...props}>{props.children}</span>
} else {
return <Link className="btn" {...props}>{props.children}</Link>
return <Link className={`btn ${props.inverted ? 'btn-inverted' : ''}`} {...props}>{props.children}</Link>
}
}