-
Notifications
You must be signed in to change notification settings - Fork 0
/
GuestEntry.tsx
92 lines (89 loc) · 2.1 KB
/
GuestEntry.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
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
85
86
87
88
89
90
91
92
import { GuestEntryProps } from "./GuestEntryProps";
import React from "react";
export const guestEntryGap = 3;
/**
* This component is a single entry for a single guest. Multiple entries will make up a guest book.
*
* @param {GuestEntryProps} guestEntry The properties/data of a single guest.
* @return {GuestEntry}
*/
export default function GuestEntry(guestEntry: GuestEntryProps) {
const bgColor = "SteelBlue";
const bRadius = 15;
const { name, website, message, visitDate } = guestEntry;
// TODO: Create a CSS class for the common style options.
return (
<div
style={{
display: "flex",
width: "95%",
height: "85px",
}}
>
<div
style={{
flex: 2,
flexDirection: "column",
display: "flex",
backgroundColor: bgColor,
borderTopLeftRadius: bRadius,
borderBottomLeftRadius: bRadius,
justifyContent: "space-evenly",
}}
>
<div
style={{
fontSize: "75%",
justifyContent: "center",
}}
>
{name}
</div>
<div
style={{
justifyContent: "center",
fontSize: "50%",
}}
>
{website}
</div>
</div>
<div
style={{
flex: 7,
display: "flex",
justifyContent: "center",
backgroundColor: bgColor,
marginLeft: guestEntryGap,
marginRight: guestEntryGap,
}}
>
<div
style={{
fontSize: "75%",
display: "flex",
alignItems: "center",
height: "100%",
width: "98%",
}}
>
{message}
</div>
</div>
<div
style={{
flex: 1,
backgroundColor: bgColor,
fontSize: "60%",
display: "flex",
alignItems: "center",
justifyContent: "center",
borderTopRightRadius: bRadius,
borderBottomRightRadius: bRadius,
}}
>
{visitDate}
</div>
</div>
);
}