Empty White Page
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user