diff options
Diffstat (limited to 'src/components/dialogBox.tsx')
-rw-r--r-- | src/components/dialogBox.tsx | 30 |
1 files changed, 30 insertions, 0 deletions
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 <Vierkant style={{ + position: "fixed", + top: "50%", left: "50%", + transform: "translate(-50%, -50%)", + boxShadow: "0 8px 32px -5px #0007", + width: 392 + }}> + <h2 style={{ marginBottom: 24 }}>{props.title}</h2> + <CancelIcon style={{ + position: "absolute", + top: 25, right: 25, + color: "var(--text)", + opacity: .85, + cursor: "pointer" + }}/> + {props.children} + </Vierkant> +} |