Button new Options

Options for Font Color
This commit is contained in:
brausjonas
2023-05-04 12:14:38 +02:00
parent 0e7b9b176b
commit cd11c3f7a9
2 changed files with 4 additions and 8 deletions
+4 -1
View File
@@ -18,6 +18,7 @@ export default function Button(p) {
let iconWidth = p.iconWidth, iconHeight = p.iconHeight;
let onClick = p.onClick;
let color = p.color;
let fontColor = p.fontColor;
//if parameters are not set, they are set to default values
if (height == null) height = 50;
@@ -26,6 +27,7 @@ export default function Button(p) {
if (iconHeight == null) iconHeight = height-10;
if (onClick == null) onClick = () => {};
if (color == null) color = "#363636";
if (fontColor == null) fontColor = "white";
//build in the icon width and height to the svg tag (svg tag should not contain any size information by default)
if (iconHTML != null) {
@@ -45,7 +47,8 @@ export default function Button(p) {
display: "flex",
alignItems: "center",
justifyContent: "center",
backgroundColor: color
backgroundColor: color,
color: fontColor
}}
onClick={onClick}>
{text}
-7
View File
@@ -8,13 +8,6 @@
--background-end-rgb: 255, 255, 255;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;
}
}
body {
color: rgb(var(--foreground-rgb));