-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathContent.js
84 lines (82 loc) · 2.05 KB
/
Content.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import React from 'react';
import clsx from 'clsx';
const Content = ({
classNames = {},
title,
subTitle,
imageUrl,
hasOverlay,
Image,
Button,
}) => {
return (
<>
<div
className={clsx('flex items-center justify-center', classNames.wrapper)}
style={{
background: Image === undefined ? 'url(' + imageUrl + ')' : '',
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
height: '100vh',
width: '100vw',
}}
>
{Image && (
<div
style={{
position: 'fixed',
height: '100vh',
width: '100vw',
overflow: 'hidden',
zIndex: -1,
}}
>
<Image />
</div>
)}
<div
style={{
background: hasOverlay
? 'linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6))'
: '',
height: '100vh',
width: '100vw',
}}
className={clsx(
' px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8',
classNames.contentWrapper,
)}
>
<h1
className={clsx(
'text-center text-4xl font-extrabold mt-32 tracking-tight sm:text-5xl lg:text-6xl',
classNames.titleWrapper,
)}
>
<span className={clsx('block text-white', classNames.title)}>
{title}
</span>
</h1>
<p
className={clsx(
'mt-6 max-w-lg mx-auto text-center text-xl text-white sm:max-w-3xl',
classNames.subTitle,
)}
>
{subTitle}
</p>
<div
className={clsx(
'mt-10 max-w-sm mx-auto sm:max-w-none sm:flex sm:justify-center lg:max-w-sm',
classNames.buttonWrapper,
)}
>
<Button />
</div>
</div>
</div>
</>
);
};
export default Content;