aboutsummaryrefslogtreecommitdiff
path: root/components/dialogBox.tsx
blob: a5b02fa48a74b373756f0b179a3ead153c9310a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { ReactNode } from 'react';

import { Vierkant } from './ui';

import CancelIcon from '@material-ui/icons/Cancel';

export function DialogBox(props: {
	children: ReactNode;
	title: string;
	onclick?: () => void;
	hidden?: boolean;
	className?: string;
}) {
	return <Vierkant
		className={'dialogbox bg-800 drop-2 pad-l posfix abscenter ' + (props.hidden ? 'dispnone' : '') + ' '
			+ props.className}
	>
		<h2 className='title'>{props.title}</h2>
		<span onClick={props.onclick}>
			<CancelIcon className='posabs close icon subtile' />
		</span>
		{props.children}
	</Vierkant>;
}