Skip to content

Commit 7c68005

Browse files
authored
Merge pull request #1823 from dxc-technology/Mil4n0r/status-light-examples
Added StatusLight examples to Website
2 parents 1fb45b6 + c2e19ee commit 7c68005

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

website/screens/components/status-light/code/StatusLightCodePage.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import QuickNavContainer from "@/common/QuickNavContainer";
33
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
44
import DocFooter from "@/common/DocFooter";
55
import TableCode from "@/common/TableCode";
6+
import Example from "@/common/example/Example";
7+
import basicUsage from "./examples/basicUsage";
68

79
const sections = [
810
{
@@ -38,9 +40,7 @@ const sections = [
3840
<td>
3941
<TableCode>string</TableCode>
4042
</td>
41-
<td>
42-
An auxiliar text that will add some context to the status.
43-
</td>
43+
<td>An auxiliar text that will add some context to the status.</td>
4444
<td>-</td>
4545
</tr>
4646
<tr>
@@ -52,7 +52,9 @@ const sections = [
5252
Size of the component. Should be defined based on its importance
5353
and/or available space.
5454
</td>
55-
<td><TableCode>'medium'</TableCode></td>
55+
<td>
56+
<TableCode>'medium'</TableCode>
57+
</td>
5658
</tr>
5759
</tbody>
5860
</DxcTable>
@@ -62,8 +64,8 @@ const sections = [
6264
title: "Examples",
6365
subSections: [
6466
{
65-
title: "Basic Usage",
66-
content: <p>Examples are not available yet, they will be added soon.</p>
67+
title: "Basic usage",
68+
content: <Example example={basicUsage} defaultIsVisible />,
6769
},
6870
],
6971
},
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {
2+
DxcStatusLight,
3+
DxcInset,
4+
} from "@dxc-technology/halstack-react";
5+
6+
const code = `() => {
7+
return (
8+
<DxcInset space="2rem">
9+
<DxcStatusLight label="Accepted" mode="success" size="large" />
10+
</DxcInset>
11+
);
12+
}`;
13+
14+
const scope = {
15+
DxcInset,
16+
DxcStatusLight,
17+
};
18+
19+
export default { code, scope };

0 commit comments

Comments
 (0)