aboutsummaryrefslogtreecommitdiff
path: root/components/dialogBox.tsx
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-18 14:28:53 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-18 14:28:53 +0200
commitaf796b465c66a61b498facff010b372a52a24508 (patch)
tree21de47cf4e1b621fc2fd1b7a3408f1fb0f188ce1 /components/dialogBox.tsx
parent465b971fd0cb80004bf60865ddc25df9cd72ba38 (diff)
wip dialog box
Diffstat (limited to 'components/dialogBox.tsx')
-rw-r--r--components/dialogBox.tsx16
1 files changed, 3 insertions, 13 deletions
diff --git a/components/dialogBox.tsx b/components/dialogBox.tsx
index 7abbded..0a61762 100644
--- a/components/dialogBox.tsx
+++ b/components/dialogBox.tsx
@@ -1,4 +1,4 @@
-import { CSSProperties, ReactNode } from 'react';
+import { ReactNode } from 'react';
import { Vierkant } from './ui';
@@ -7,20 +7,10 @@ import CancelIcon from '@material-ui/icons/Cancel';
export function DialogBox(props: {
children: ReactNode;
title: string;
- style?: CSSProperties;
onclick?: () => void;
+ hidden?: boolean;
}) {
- return <Vierkant
- style={{
- position: 'fixed',
- top: '50%',
- left: '50%',
- transform: 'translate(-50%, -50%)',
- boxShadow: '0 8px 32px -5px #0007',
- width: 392,
- ...props.style,
- }}
- >
+ return <Vierkant className={'dialogbox drop-2 pad-l posfix abscenter ' + (props.hidden ? 'dispnone' : '')}>
<h2 style={{ marginBottom: 24 }}>{props.title}</h2>
<span onClick={props.onclick}>
<CancelIcon