Skip to content

Commit cf5e3f2

Browse files
committed
Added options to example and changed descriptions
1 parent 9ae100b commit cf5e3f2

File tree

3 files changed

+35
-23
lines changed

3 files changed

+35
-23
lines changed

website/screens/components/resultset-table/code/ResultsetTableCodePage.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const sections = [
204204
content: (
205205
<DxcParagraph>
206206
A compound component aimed to be used inside the resultset table's
207-
displayValue.
207+
displayValue to display up to three actions.
208208
</DxcParagraph>
209209
),
210210
subSections: [
@@ -236,17 +236,17 @@ const sections = [
236236
</td>
237237
<td>
238238
<p>
239-
This prop represents a list of interactuable elements that
240-
will work as buttons or as a dropdown. Those with an
239+
It represents a list of interactuable elements that will
240+
work as buttons or as a dropdown. Those with an{" "}
241241
<TableCode>icon</TableCode> are treated as buttons. If any
242-
element lacks an <TableCode>icon</TableCode> and includes
242+
element lacks an <TableCode>icon</TableCode> and includes{" "}
243243
<TableCode>options</TableCode>, it is interpreted as a
244-
dropdown. Only the first one with options will be displayed
245-
and no more than three elements will be displayed in total.
246-
In the case of the dropdown the click function will pass the
247-
value assigned to the option, check{" "}
244+
dropdown. Only the first action with options will be
245+
displayed and only up to 3 actions. In the case of the
246+
dropdown the click function will pass the value assigned to
247+
the option, click{" "}
248248
<Link href="/components/dropdown" passHref legacyBehavior>
249-
<DxcLink>dropdown</DxcLink>
249+
<DxcLink>here</DxcLink>
250250
</Link>{" "}
251251
for more details.
252252
</p>

website/screens/components/resultset-table/code/examples/reduced.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
DxcResultsetTable,
3-
DxcInset,
4-
} from "@dxc-technology/halstack-react";
1+
import { DxcResultsetTable, DxcInset } from "@dxc-technology/halstack-react";
52
import { deleteIcon } from "./Icons";
63

74
const code = `() => {
@@ -18,6 +15,20 @@ const code = `() => {
1815
title: "icon",
1916
onClick: () => {},
2017
},
18+
{
19+
title: "edit",
20+
onClick: (value) => {},
21+
options:[
22+
{
23+
value: "1",
24+
label: "Edit",
25+
},
26+
{
27+
value: "2",
28+
label: "Mark as selected",
29+
},
30+
]
31+
},
2132
];
2233
2334
const rows = [

website/screens/components/table/code/TableCodePage.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ const sections = [
106106
title: "DxcTable.ActionsCell",
107107
content: (
108108
<DxcParagraph>
109-
A compound component aimed to be used inside the table.
109+
A compound component aimed to be used inside the table to display up to
110+
three actions.
110111
</DxcParagraph>
111112
),
112113
subSections: [
@@ -138,17 +139,17 @@ const sections = [
138139
</td>
139140
<td>
140141
<p>
141-
This prop represents a list of interactuable elements that
142-
will work as buttons or as a dropdown. Those with an
142+
It represents a list of interactuable elements that will
143+
work as buttons or as a dropdown. Those with an{" "}
143144
<TableCode>icon</TableCode> are treated as buttons. If any
144-
element lacks an <TableCode>icon</TableCode> and includes
145+
element lacks an <TableCode>icon</TableCode> and includes{" "}
145146
<TableCode>options</TableCode>, it is interpreted as a
146-
dropdown. Only the first one with options will be displayed
147-
and no more than three elements will be displayed in total.
148-
In the case of the dropdown the click function will pass the
149-
value assigned to the option, check{" "}
147+
dropdown. Only the first action with options will be
148+
displayed and only up to 3 actions. In the case of the
149+
dropdown the click function will pass the value assigned to
150+
the option, click{" "}
150151
<Link href="/components/dropdown" passHref legacyBehavior>
151-
<DxcLink>dropdown</DxcLink>
152+
<DxcLink>here</DxcLink>
152153
</Link>{" "}
153154
for more details.
154155
</p>
@@ -177,7 +178,7 @@ const sections = [
177178
content: <Example example={reduced} defaultIsVisible />,
178179
},
179180
{
180-
title: "Actions cell usage",
181+
title: "Actions cell",
181182
content: <Example example={actions} defaultIsVisible />,
182183
},
183184
],

0 commit comments

Comments
 (0)