Skip to content

Commit b4f9893

Browse files
committed
fix(ui-tabs,shared-types): color tabs.panel focus outline from the theme and make it overridable by brand overrides
INSTUI-4690
1 parent b94c875 commit b4f9893

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/shared-types/src/ComponentThemeVariables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,7 @@ export type TabsPanelTheme = {
13871387
borderWidth: Border['widthSmall']
13881388
borderStyle: Border['style']
13891389
defaultOverflowY: string
1390+
focusOutlineColor: Colors['contrasts']['blue4570']
13901391
}
13911392

13921393
export type TabsTabTheme = {

packages/ui-tabs/src/Tabs/Panel/styles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ const generateStyle = (
5959
}),
6060
...(isHidden && {
6161
display: 'none'
62-
})
62+
}),
63+
'&:focus': {
64+
outlineColor: componentTheme.focusOutlineColor
65+
}
6366
},
6467
content: {
6568
label: 'panel__content',

packages/ui-tabs/src/Tabs/Panel/theme.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const generateComponentTheme = (theme: Theme): TabsPanelTheme => {
3535

3636
const themeSpecificStyle: ThemeSpecificStyle<TabsPanelTheme> = {
3737
canvas: {
38-
color: theme['ic-brand-font-color-dark']
38+
color: theme['ic-brand-font-color-dark'],
39+
focusOutlineColor: theme['ic-brand-primary']
3940
}
4041
}
4142

@@ -49,7 +50,8 @@ const generateComponentTheme = (theme: Theme): TabsPanelTheme => {
4950
borderColor: colors?.contrasts?.grey3045,
5051
borderWidth: borders?.widthSmall,
5152
borderStyle: borders?.style,
52-
defaultOverflowY: 'auto'
53+
defaultOverflowY: 'auto',
54+
focusOutlineColor: colors.contrasts.blue4570
5355
}
5456

5557
return {

0 commit comments

Comments
 (0)