-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathButtonWithMessage.tsx
More file actions
81 lines (78 loc) · 2.15 KB
/
ButtonWithMessage.tsx
File metadata and controls
81 lines (78 loc) · 2.15 KB
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
import {
MjmlButton as Button,
MjmlColumn as Column,
MjmlSection as Section,
MjmlText as Text
} from 'mjml-react';
import type { ButtonWithMessageProps } from '../types';
const fontFamily =
'Ubuntu, Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif';
export function ButtonWithMessage({
link,
message,
subMessage,
linkText,
bodyBgColor = 'white',
bodyTextColor = '#414141',
buttonBgColor = '#414141',
buttonTextColor = 'white'
}: ButtonWithMessageProps = {}) {
return (
<>
<Section backgroundColor={bodyBgColor} paddingBottom="0px" paddingTop="0">
<Column width="100%" verticalAlign="top">
<Text
align="center"
color={bodyTextColor}
fontFamily={fontFamily}
fontSize="13px"
paddingLeft="25px"
paddingRight="25px"
paddingBottom="0px"
paddingTop="0"
>
<p>
<span style={{ fontSize: '27px' }}>
<span style={{ fontWeight: 'bold' }}>
<span style={{ color: bodyTextColor }}>{message}</span>
</span>
</span>
</p>
{subMessage != null ? subMessage : null}
</Text>
<Button
backgroundColor={buttonBgColor}
color={buttonTextColor}
fontSize="15px"
align="center"
verticalAlign="middle"
border="none"
padding="15px 30px"
borderRadius="3px"
href={link}
fontFamily={fontFamily}
paddingLeft="25px"
paddingRight="25px"
paddingBottom="25px"
paddingTop="25px"
>
{linkText}
</Button>
<Text
align="center"
color={bodyTextColor}
fontFamily={fontFamily}
fontSize="11px"
paddingLeft="25px"
paddingRight="25px"
paddingBottom="0px"
paddingTop="0px"
>
<p>or copy and paste this link into your browser:</p>
<p>{link}</p>
</Text>
</Column>
</Section>
</>
);
}