-
Notifications
You must be signed in to change notification settings - Fork 0
/
Container.tsx
100 lines (92 loc) · 2.06 KB
/
Container.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
93
94
95
96
97
98
99
100
import * as React from 'react';
const Container = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<div id={props.id} {...props}>
{props.children}
</div>
);
};
const PageContent = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<div
id={props.id}
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} w-9/12 sm:11/12 mx-auto`}
>
{props.children}
</div>
);
};
const Flex = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<div
id={props.id}
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} flex`}
>
{props.children}
</div>
);
};
const FlexCols = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<div
id={props.id}
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} flex flex-col`}
>
{props.children}
</div>
);
};
const FlexRow = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<div
id={props.id}
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} flex flex-row`}
>
{props.children}
</div>
);
};
const FlexResponsiveRow = (props: React.HTMLProps<HTMLDivElement>) => {
return (
<FlexRow
id={props.id}
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} sm:flex-col`}
>
{props.children}
</FlexRow>
);
};
const Card = (props: React.HTMLProps<HTMLDivElement>) => (
<div
itemProp={props.itemProp}
itemScope={props.itemScope}
itemType={props.itemType}
className={`${props.className} p-6 bg-white border border-gray-200 rounded-lg shadow`}
>
{props.children}
</div>
);
export default {
Card,
Container,
Flex,
FlexCols,
FlexRow,
FlexResponsiveRow,
PageContent,
};