aboutsummaryrefslogtreecommitdiff
path: root/src/components/vierkant.tsx
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-01-05 20:39:59 +0100
committerlonkaars <l.leblansch@gmail.com>2021-01-05 20:39:59 +0100
commit9b2d93642e2c94ed96d08858f9e0f737eeba5489 (patch)
tree73a1af3c4ddbc4168c0fc4252c807c5899bc27e2 /src/components/vierkant.tsx
parente5f33be1d2a348416bb63e055365fc0dd611c885 (diff)
home pagina klaar
Diffstat (limited to 'src/components/vierkant.tsx')
-rw-r--r--src/components/vierkant.tsx34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/components/vierkant.tsx b/src/components/vierkant.tsx
index 6140e7a..588d73d 100644
--- a/src/components/vierkant.tsx
+++ b/src/components/vierkant.tsx
@@ -1,20 +1,24 @@
-import { Component, CSSProperties } from "react";
+import { ReactNode } from "react";
-var VierkantStyle: CSSProperties = {
- padding: 24,
- backgroundColor: "var(--background)",
- borderRadius: 8,
- color: "var(--text)",
- margin: 6, // geen margin collapse = 12px marge
- display: "inline-block",
- position: "relative"
+interface VierkantProps {
+ href?: string;
+ width?: string;
+ height?: string;
+ children?: ReactNode;
}
-export class Vierkant extends Component {
- render () {
- return <div style={VierkantStyle}>
- {this.props.children}
- </div>
- }
+export function Vierkant(props: VierkantProps) {
+ return <a style={{
+ padding: 24,
+ backgroundColor: "var(--background)",
+ borderRadius: 8,
+ color: "var(--text)",
+ margin: 6, // geen margin collapse = 12px marge
+ display: "inline-block",
+ position: "relative",
+ boxSizing: "border-box",
+ width: props.width ? props.width : undefined,
+ height: props.height ? props.height : undefined,
+ }} href={props.href}>{props.children}</a>
}