-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dialog.tsx
29 lines (25 loc) · 956 Bytes
/
Dialog.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as React from 'react';
import Cta from './Cta';
import Heading from './Heading';
import Container from './Container';
interface Props {
children?: JSX.Element | JSX.Element[] | string;
closeText: string;
onClose: () => void;
title: string;
}
const Dialog = (props: Props) => (
<Container.Container className="h-screen left-0 overflow-hidden fixed right-0 top-0 w-screen z-50">
<Container.Container className="bg-gray-800/60 h-screen w-screen" />
<Container.Container className="bg-white bottom-0 h-fit left-0 m-auto p-8 fixed right-0 top-0 w-3/6">
<Heading.H2>{props.title}</Heading.H2>
<Container.Container className="text-lg p-4">
{props.children}
</Container.Container>
<Container.Flex className="justify-center m-auto w-3/6">
<Cta onClick={props.onClose}>{props.closeText}</Cta>
</Container.Flex>
</Container.Container>
</Container.Container>
);
export default Dialog;