File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
src/lib/components/Table/_components Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 14
14
border-bottom-width : 2px ;
15
15
}
16
16
17
+ .tableHeadCellLayout {
18
+ display : flex ;
19
+ gap : settings .$cell-padding-x ;
20
+ align-items : center ;
21
+ }
22
+
17
23
.isTableCellSortingActive ,
18
24
.isTableHeadCellSortingActive {
19
25
background-color : settings .$sorted-background-color ;
20
26
}
21
-
22
- .sortButton {
23
- display : inline-block ;
24
- margin-right : settings .$cell-padding-x ;
25
- }
Original file line number Diff line number Diff line change @@ -16,23 +16,26 @@ export const TableHeaderCell = ({
16
16
className = { isSortingActive ? styles . isTableHeadCellSortingActive : styles . tableHeadCell }
17
17
id = { id }
18
18
>
19
- { sort && column . isSortable && (
20
- < div className = { styles . sortButton } >
19
+ < span className = { styles . tableHeadCellLayout } >
20
+ { sort && column . isSortable && (
21
21
< Button
22
+ aria-pressed = { isSortingActive }
22
23
beforeLabel = {
23
24
sortDirection === 'asc'
24
25
? sort . ascendingIcon
25
26
: sort . descendingIcon
26
27
}
28
+ color = { isSortingActive ? 'selected' : 'secondary' }
27
29
id = { id && `${ id } __sortButton` }
28
30
label = { sortDirection }
29
31
labelVisibility = "none"
30
32
onClick = { ( ) => sort . onClick ( column . name , sortDirection ) }
31
33
priority = "flat"
34
+ size = "small"
32
35
/>
33
- </ div >
34
- ) }
35
- { column . label }
36
+ ) }
37
+ { column . label }
38
+ </ span >
36
39
</ th >
37
40
) ;
38
41
} ;
You can’t perform that action at this time.
0 commit comments