Skip to content

Commit 5b8231d

Browse files
committed
fix(ui-table): make TableColHeader focus outline and sorted icon overridable by brand overrides
INSTUI-4378
1 parent f345a58 commit 5b8231d

File tree

1 file changed

+11
-3
lines changed
  • packages/ui-table/src/Table/ColHeader

1 file changed

+11
-3
lines changed

packages/ui-table/src/Table/ColHeader/theme.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
import type { Theme } from '@instructure/ui-themes'
25+
import type { Theme, ThemeSpecificStyle } from '@instructure/ui-themes'
2626
import { TableColHeaderTheme } from '@instructure/shared-types'
2727

2828
/**
@@ -31,7 +31,14 @@ import { TableColHeaderTheme } from '@instructure/shared-types'
3131
* @return {Object} The final theme object with the overrides and component variables
3232
*/
3333
const generateComponentTheme = (theme: Theme): TableColHeaderTheme => {
34-
const { typography, colors, borders, spacing } = theme
34+
const { typography, colors, borders, spacing, key: themeName } = theme
35+
36+
const themeSpecificStyle: ThemeSpecificStyle<TableColHeaderTheme> = {
37+
canvas: {
38+
focusOutlineColor: theme['ic-brand-primary'],
39+
sortedIconColor: theme['ic-brand-primary']
40+
}
41+
}
3542

3643
const componentVariables: TableColHeaderTheme = {
3744
fontSize: typography?.fontSizeMedium,
@@ -54,7 +61,8 @@ const generateComponentTheme = (theme: Theme): TableColHeaderTheme => {
5461
}
5562

5663
return {
57-
...componentVariables
64+
...componentVariables,
65+
...themeSpecificStyle[themeName]
5866
}
5967
}
6068

0 commit comments

Comments
 (0)