Skip to content

Commit f89d922

Browse files
committed
chore: style resize button
1 parent 9c1e385 commit f89d922

File tree

7 files changed

+478
-161
lines changed

7 files changed

+478
-161
lines changed

packages/module/patternfly-docs/content/extensions/data-view/examples/Table/DataViewTableResizableColumnsExample.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,31 @@ export const ResizableColumnsExample: FunctionComponent = () => {
124124
screenReaderText
125125
}
126126
},
127-
'Pull requests',
128-
{ cell: 'Workspaces', props: { info: { tooltip: 'More information' } } },
129-
{ cell: 'Last commit', props: { sort: { sortBy: {}, columnIndex: 4 } } }
127+
{
128+
cell: 'Pull requests',
129+
resizableProps: {
130+
isResizable: true,
131+
onResize,
132+
screenReaderText
133+
},
134+
props: { info: { tooltip: 'More information' } }
135+
},
136+
{
137+
cell: 'This is a really long title',
138+
resizableProps: {
139+
isResizable: true,
140+
onResize,
141+
screenReaderText
142+
},
143+
props: { info: { tooltip: 'More information' } }
144+
},
145+
{ cell: 'Last commit',
146+
resizableProps: {
147+
isResizable: true,
148+
onResize,
149+
screenReaderText
150+
},
151+
props: { sort: { sortBy: {}, columnIndex: 4 } } }
130152
];
131153

132154
return <DataViewTable isResizable aria-label="Repositories table" ouiaId={ouiaId} columns={columns} rows={rows} />;

packages/module/src/DataViewTable/__snapshots__/DataViewTable.test.tsx.snap

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,64 @@ exports[`DataViewTable component should render a basic table correctly 1`] = `
2121
data-ouia-safe="true"
2222
>
2323
<th
24-
class="pf-v6-c-table__th"
24+
class="pf-v6-c-table__th pf-m-truncate"
2525
data-ouia-component-id="TableExample-th-0"
2626
scope="col"
2727
tabindex="-1"
2828
>
29-
Repositories
29+
<span
30+
class="pf-v6-c-table__text"
31+
>
32+
Repositories
33+
</span>
3034
</th>
3135
<th
32-
class="pf-v6-c-table__th"
36+
class="pf-v6-c-table__th pf-m-truncate"
3337
data-ouia-component-id="TableExample-th-1"
3438
scope="col"
3539
tabindex="-1"
3640
>
37-
Branches
41+
<span
42+
class="pf-v6-c-table__text"
43+
>
44+
Branches
45+
</span>
3846
</th>
3947
<th
40-
class="pf-v6-c-table__th"
48+
class="pf-v6-c-table__th pf-m-truncate"
4149
data-ouia-component-id="TableExample-th-2"
4250
scope="col"
4351
tabindex="-1"
4452
>
45-
Pull requests
53+
<span
54+
class="pf-v6-c-table__text"
55+
>
56+
Pull requests
57+
</span>
4658
</th>
4759
<th
48-
class="pf-v6-c-table__th"
60+
class="pf-v6-c-table__th pf-m-truncate"
4961
data-ouia-component-id="TableExample-th-3"
5062
scope="col"
5163
tabindex="-1"
5264
>
53-
Workspaces
65+
<span
66+
class="pf-v6-c-table__text"
67+
>
68+
Workspaces
69+
</span>
5470
</th>
5571
<th
56-
class="pf-v6-c-table__th"
72+
class="pf-v6-c-table__th pf-m-truncate"
5773
data-ouia-component-id="TableExample-th-4"
5874
scope="col"
5975
tabindex="-1"
6076
>
61-
Last commit
77+
<span
78+
class="pf-v6-c-table__text"
79+
>
80+
Last commit
81+
</span>
6282
</th>
6383
</tr>
6484
</thead>
@@ -344,44 +364,64 @@ exports[`DataViewTable component should render a tree table correctly 1`] = `
344364
data-ouia-safe="true"
345365
>
346366
<th
347-
class="pf-v6-c-table__th"
367+
class="pf-v6-c-table__th pf-m-truncate"
348368
data-ouia-component-id="TableExample-th-0"
349369
scope="col"
350370
tabindex="-1"
351371
>
352-
Repositories
372+
<span
373+
class="pf-v6-c-table__text"
374+
>
375+
Repositories
376+
</span>
353377
</th>
354378
<th
355-
class="pf-v6-c-table__th"
379+
class="pf-v6-c-table__th pf-m-truncate"
356380
data-ouia-component-id="TableExample-th-1"
357381
scope="col"
358382
tabindex="-1"
359383
>
360-
Branches
384+
<span
385+
class="pf-v6-c-table__text"
386+
>
387+
Branches
388+
</span>
361389
</th>
362390
<th
363-
class="pf-v6-c-table__th"
391+
class="pf-v6-c-table__th pf-m-truncate"
364392
data-ouia-component-id="TableExample-th-2"
365393
scope="col"
366394
tabindex="-1"
367395
>
368-
Pull requests
396+
<span
397+
class="pf-v6-c-table__text"
398+
>
399+
Pull requests
400+
</span>
369401
</th>
370402
<th
371-
class="pf-v6-c-table__th"
403+
class="pf-v6-c-table__th pf-m-truncate"
372404
data-ouia-component-id="TableExample-th-3"
373405
scope="col"
374406
tabindex="-1"
375407
>
376-
Workspaces
408+
<span
409+
class="pf-v6-c-table__text"
410+
>
411+
Workspaces
412+
</span>
377413
</th>
378414
<th
379-
class="pf-v6-c-table__th"
415+
class="pf-v6-c-table__th pf-m-truncate"
380416
data-ouia-component-id="TableExample-th-4"
381417
scope="col"
382418
tabindex="-1"
383419
>
384-
Last commit
420+
<span
421+
class="pf-v6-c-table__text"
422+
>
423+
Last commit
424+
</span>
385425
</th>
386426
</tr>
387427
</thead>

0 commit comments

Comments
 (0)