Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 31a94a2

Browse files
committed
Make sort icon for table column headers remain on the same line as the text
Change-type: patch Signed-off-by: Matthew Yarmolinsky <[email protected]>
1 parent 66c636e commit 31a94a2

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/components/Table/TableBase.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { px } from '../../utils';
1414
import { CheckboxProps, Checkbox } from '../Checkbox';
1515
import { Pager } from '../Pager';
1616
import { CheckboxWrapper, TableBaseColumn, TableRow } from './TableRow';
17+
import { Flex } from '../Flex';
1718

1819
const highlightStyle = `
1920
background-color: ${theme.colors.info.light};
@@ -586,16 +587,18 @@ export class TableBase<T> extends React.Component<
586587
primary={sort.field === item.field}
587588
onClick={this.toggleSort}
588589
>
589-
{item.label || item.field}
590-
&nbsp;
591-
<FontAwesomeIcon
592-
icon={faSort}
593-
color={
594-
sort.field === item.field
595-
? theme.colors.info.main
596-
: ''
597-
}
598-
/>
590+
<Flex alignItems="center">
591+
{item.label || item.field}
592+
&nbsp;
593+
<FontAwesomeIcon
594+
icon={faSort}
595+
color={
596+
sort.field === item.field
597+
? theme.colors.info.main
598+
: ''
599+
}
600+
/>
601+
</Flex>
599602
</HeaderButton>
600603
</div>
601604
);

0 commit comments

Comments
 (0)