diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-01-07 09:32:13 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-01-07 09:32:13 +0100 |
commit | e3cc72181c9957f0a95bb9d89b7ab6a18f0a861b (patch) | |
tree | 3d20810fcbf7dc1e142c3ff676c3f094b0c59756 /src/components/ui.tsx | |
parent | 492fb773617f7af2d03c662d20f3967dc929375d (diff) |
vierkant.tsx -> ui.tsx
Diffstat (limited to 'src/components/ui.tsx')
-rw-r--r-- | src/components/ui.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/ui.tsx b/src/components/ui.tsx new file mode 100644 index 0000000..558eab8 --- /dev/null +++ b/src/components/ui.tsx @@ -0,0 +1,26 @@ +import { CSSProperties, ReactNode } from "react"; + +interface VierkantProps { + href?: string; + width?: string; + height?: string; + style?: CSSProperties; + children?: ReactNode; +} + +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, + ...props.style + }} href={props.href}>{props.children}</a> +} + |