From 65cfd59f908b0d2667395f2d64df8fb81837f744 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 6 Jan 2021 21:33:53 +0100 Subject: dialoogvensters --- src/components/dialogBox.tsx | 30 ++++++++++++++++++++++++++++++ src/components/vierkant.tsx | 4 +++- src/components/voerBord.tsx | 6 ------ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 src/components/dialogBox.tsx (limited to 'src/components') diff --git a/src/components/dialogBox.tsx b/src/components/dialogBox.tsx new file mode 100644 index 0000000..778cd7a --- /dev/null +++ b/src/components/dialogBox.tsx @@ -0,0 +1,30 @@ +import { ReactNode } from 'react'; + +import { Vierkant } from './vierkant'; + +import CancelIcon from '@material-ui/icons/Cancel'; + +interface DialogBoxProps { + children: ReactNode; + title: string; +} + +export function DialogBox(props: DialogBoxProps) { + return +

{props.title}

+ + {props.children} +
+} diff --git a/src/components/vierkant.tsx b/src/components/vierkant.tsx index 588d73d..558eab8 100644 --- a/src/components/vierkant.tsx +++ b/src/components/vierkant.tsx @@ -1,9 +1,10 @@ -import { ReactNode } from "react"; +import { CSSProperties, ReactNode } from "react"; interface VierkantProps { href?: string; width?: string; height?: string; + style?: CSSProperties; children?: ReactNode; } @@ -19,6 +20,7 @@ export function Vierkant(props: VierkantProps) { boxSizing: "border-box", width: props.width ? props.width : undefined, height: props.height ? props.height : undefined, + ...props.style }} href={props.href}>{props.children} } diff --git a/src/components/voerBord.tsx b/src/components/voerBord.tsx index 28de567..c430d02 100644 --- a/src/components/voerBord.tsx +++ b/src/components/voerBord.tsx @@ -28,12 +28,6 @@ export function VoerBord(props: VoerBordProps) { border: "2px solid var(--background-alt)", opacity: .5 }}/> -
))} -- cgit v1.2.3