File tree Expand file tree Collapse file tree 2 files changed +593
-253
lines changed
packages/blade/src/components/Table Expand file tree Collapse file tree 2 files changed +593
-253
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,14 @@ const StyledHeaderCell = styled(HeaderCell)<{
124
124
? makeSpace ( getIn ( theme , tableRow . paddingRight [ $rowDensity ] ) )
125
125
: undefined ,
126
126
minHeight : makeSize ( getIn ( size , tableRow . minHeight [ $rowDensity ] ) ) ,
127
+ '> .text' : {
128
+ flexGrow : 1 ,
129
+ display : 'flex' ,
130
+ justifyContent : $textAlign ,
131
+ } ,
132
+ '> .sortIcon' : {
133
+ flexShrink : 0 ,
134
+ } ,
127
135
} ,
128
136
'&:focus-visible' : getFocusRingStyles ( { theme, negativeOffset : true } ) ,
129
137
} ,
@@ -162,20 +170,24 @@ const _TableHeaderCell = ({
162
170
{ ...metaAttribute ( { name : MetaConstants . TableHeaderCell } ) }
163
171
{ ...makeAnalyticsAttribute ( rest ) }
164
172
>
165
- { isChildrenString ? (
166
- < Text size = "medium" weight = "medium" color = "surface.text.gray.normal" >
167
- { children }
168
- </ Text >
169
- ) : (
170
- children
171
- ) }
173
+ < div className = "text" >
174
+ { isChildrenString ? (
175
+ < Text size = "medium" weight = "medium" color = "surface.text.gray.normal" >
176
+ { children }
177
+ </ Text >
178
+ ) : (
179
+ children
180
+ ) }
181
+ </ div >
172
182
{ isSortable && (
173
- < BaseBox paddingLeft = "spacing.2" backgroundColor = "transparent" >
174
- < SortIcon
175
- isSorted = { currentSortedState . sortKey === headerKey }
176
- isSortReversed = { currentSortedState . isSortReversed }
177
- />
178
- </ BaseBox >
183
+ < div className = "sortIcon" >
184
+ < BaseBox paddingLeft = "spacing.2" backgroundColor = "transparent" >
185
+ < SortIcon
186
+ isSorted = { currentSortedState . sortKey === headerKey }
187
+ isSortReversed = { currentSortedState . isSortReversed }
188
+ />
189
+ </ BaseBox >
190
+ </ div >
179
191
) }
180
192
</ StyledHeaderCell >
181
193
) ;
You can’t perform that action at this time.
0 commit comments