-
Notifications
You must be signed in to change notification settings - Fork 14
/
BleedCodePage.tsx
158 lines (155 loc) · 4.57 KB
/
BleedCodePage.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import { DxcFlex, DxcTable } from "@dxc-technology/halstack-react";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import QuickNavContainer from "@/common/QuickNavContainer";
import TableCode from "@/common/TableCode";
import DocFooter from "@/common/DocFooter";
import Example from "@/common/example/Example";
import basicUsage from "./examples/basicUsage";
import customSizes from "./examples/customSides";
import StatusBadge from "@/common/StatusBadge";
const sections = [
{
title: "Props",
content: (
<DxcTable>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td>space</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to all sides.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>horizontal</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the left and right sides.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>vertical</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the top and bottom sides.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>top</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the top side.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>right</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the right side.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>bottom</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the bottom side.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>left</td>
<td>
<TableCode>
'0rem' | '0.125rem' | '0.25rem' | '0.5rem' | '1rem' | '1.5rem' |
'2rem' | '3rem' | '4rem' | '5rem'
</TableCode>
</td>
<td>Applies the spacing scale to the left side.</td>
<td>
<TableCode>'0rem'</TableCode>
</td>
</tr>
<tr>
<td>
<DxcFlex direction="column" gap="0.25rem" alignItems="baseline">
<StatusBadge status="required" />
children
</DxcFlex>
</td>
<td>
<TableCode>React.ReactNode</TableCode>
</td>
<td>Custom content inside the bleed.</td>
<td>-</td>
</tr>
</DxcTable>
),
},
{
title: "Examples",
subSections: [
{
title: "Basic usage",
content: <Example example={basicUsage} defaultIsVisible />,
},
{
title: "Custom sides",
content: <Example example={customSizes} defaultIsVisible />,
},
],
},
];
const BleedTableCodePage = () => {
return (
<DxcFlex direction="column" gap="4rem">
<QuickNavContainerLayout>
<QuickNavContainer
sections={sections}
startHeadingLevel={2}
></QuickNavContainer>
</QuickNavContainerLayout>
<DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/website/screens/components/bleed/TableCode/BleedTableCodePage.tsx" />
</DxcFlex>
);
};
export default BleedTableCodePage;