Empty White Page

This commit is contained in:
brausjonas
2023-05-02 15:17:14 +02:00
parent 2b8b5259b9
commit 04ca2319c2
4 changed files with 42 additions and 163 deletions
-39
View File
@@ -1,39 +0,0 @@
import "../App.css"
export default function Button(p) {
let text = p.text;
let width = p.width, height = p.height;
let iconHTML = p.icon;
let iconWidth = p.iconWidth, iconHeight = p.iconHeight;
let onClick = p.onClick;
if (height == null) height = 50;
if (width == null) width = 100;
if (iconWidth == null) iconWidth = 50;
if (iconHeight == null) iconHeight = 50;
if (onClick == null) onClick = () => {};
if (iconHTML != null) {
let split = iconHTML.split("fill=");
split[1] = "fill=" + split[1];
split[0] += " width=" + iconWidth + " height=" + iconHeight + " ";
iconHTML = split[0] + split[1]
} else {
iconHTML = "";
}
return (
<>
<button className={"round-border button font font-middle"}
style={{
width: width,
height: height,
}}
onClick={onClick}>
{text}
<div dangerouslySetInnerHTML={{__html: iconHTML}}/>
</button>
</>
);
}