aboutsummaryrefslogtreecommitdiff
path: root/src/components/ui.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui.tsx')
-rw-r--r--src/components/ui.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/ui.tsx b/src/components/ui.tsx
index 558eab8..d869151 100644
--- a/src/components/ui.tsx
+++ b/src/components/ui.tsx
@@ -24,3 +24,32 @@ export function Vierkant(props: VierkantProps) {
}} href={props.href}>{props.children}</a>
}
+interface ButtonProps {
+ text?: string;
+ children?: ReactNode;
+ style?: CSSProperties;
+ onclick?: (() => void);
+}
+
+export function Button(props: ButtonProps) {
+ return <div onClick={props.onclick} style={{
+ padding: props.text ? 8 : 16,
+ textAlign: props.text ? "center" : "left",
+ borderRadius: 8,
+ backgroundColor: "var(--disk-a)",
+ cursor: "pointer",
+ position: "relative",
+ ...props.style
+ }}>
+ {
+ props.text ?
+ <span style={{
+ fontWeight: 600,
+ userSelect: "none"
+ }}>{props.text}</span>
+ : undefined
+ }
+ { props.children }
+ </div>;
+}
+