Calender Resize

Der Kalender kann mittels eines "+" und "-" buttons vergrößert und verkleinert werden. D.h. Zeilen werden enger zusammengerückt oder auseinander gezogen
This commit is contained in:
brausjonas
2023-05-06 00:12:20 +02:00
parent 4a4601d175
commit af5849affc
3 changed files with 204 additions and 159 deletions
+8 -3
View File
@@ -19,15 +19,17 @@ export default function Button(p) {
let onClick = p.onClick;
let color = p.color;
let fontColor = p.fontColor;
let font_size = p.fontSize;
//if parameters are not set, they are set to default values
if (height == null) height = 50;
if (width == null) width = 100;
if (height == null) height = 0;
if (width == null) width = 0;
if (iconWidth == null) iconWidth = width-10;
if (iconHeight == null) iconHeight = height-10;
if (onClick == null) onClick = () => {};
if (color == null) color = "#363636";
if (fontColor == null) fontColor = "white";
if (font_size == null) font_size = 16;
//build in the icon width and height to the svg tag (svg tag should not contain any size information by default)
if (iconHTML != null) {
@@ -48,7 +50,10 @@ export default function Button(p) {
alignItems: "center",
justifyContent: "center",
backgroundColor: color,
color: fontColor
color: fontColor,
fontSize: font_size,
minWidth: width,
minHeight: height
}}
onClick={onClick}>
{text}