From cd11c3f7a9ff85db517a8785d4d6295baf5e0d91 Mon Sep 17 00:00:00 2001 From: brausjonas Date: Thu, 4 May 2023 12:14:38 +0200 Subject: [PATCH] Button new Options Options for Font Color --- anwendung/src/components/Button.jsx | 5 ++++- anwendung/src/styles/globals.css | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/anwendung/src/components/Button.jsx b/anwendung/src/components/Button.jsx index 769e53d..d37acb8 100644 --- a/anwendung/src/components/Button.jsx +++ b/anwendung/src/components/Button.jsx @@ -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} diff --git a/anwendung/src/styles/globals.css b/anwendung/src/styles/globals.css index 96cea5a..7d12b8e 100644 --- a/anwendung/src/styles/globals.css +++ b/anwendung/src/styles/globals.css @@ -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));