-
Notifications
You must be signed in to change notification settings - Fork 14
/
BoxCodePage.tsx
116 lines (113 loc) · 3.3 KB
/
BoxCodePage.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
import { DxcFlex, DxcTable } from "@dxc-technology/halstack-react";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import QuickNavContainer from "@/common/QuickNavContainer";
import DocFooter from "@/common/DocFooter";
import Example from "@/common/example/Example";
import basicUsage from "./examples/basicUsage";
import TableCode from "@/common/TableCode";
import StatusBadge from "@/common/StatusBadge";
import Code from "@/common/Code";
const sections = [
{
title: "Props",
content: (
<DxcTable>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>shadowDepth</td>
<td>
<TableCode>0 | 1 | 2</TableCode>
</td>
<td>The size of the shadow to be displayed around the box.</td>
<td>
<TableCode>2</TableCode>
</td>
</tr>
<tr>
<td>display</td>
<td>
<TableCode>string</TableCode>
</td>
<td>
Changes the CSS <Code>display</Code> property of the container.
</td>
<td>
<TableCode>'inline-flex'</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 that will be placed in the box component.</td>
<td>-</td>
</tr>
<tr>
<td>margin</td>
<td>
<TableCode>
'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' |
'xxlarge' | Margin
</TableCode>
</td>
<td>
Size of the margin to be applied to the component. You can pass an
object with 'top', 'bottom', 'left' and 'right' properties in
order to specify different margin sizes.
</td>
<td>-</td>
</tr>
<tr>
<td>size</td>
<td>
<TableCode>
'small' | 'medium' | 'large' | 'fillParent' | 'fitContent'
</TableCode>
</td>
<td>Size of the component.</td>
<td>
<TableCode>'fitContent'</TableCode>
</td>
</tr>
</tbody>
</DxcTable>
),
},
{
title: "Examples",
subSections: [
{
title: "Basic usage",
content: <Example example={basicUsage} defaultIsVisible />,
},
],
},
];
const BoxCodePage = () => {
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/box/code/BoxCodePage.tsx" />
</DxcFlex>
);
};
export default BoxCodePage;