Skip to content

Commit 38f2e32

Browse files
committed
feat(ui-top-nav-bar,shared-types): style fix
1 parent 38a1538 commit 38f2e32

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

packages/__docs__/src/App/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class App extends Component<AppProps, AppState> {
388388
]
389389
}
390390
]}
391-
currentPageId="library" // ltiCurrentPageID
391+
currentPageId="share" // ltiCurrentPageID
392392
/>
393393
<Tray
394394
label="Courses"

packages/shared-types/src/ComponentThemeVariables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,7 @@ export type CanvasTopNavTheme = {
17711771
drilldownBorderColor: string
17721772
topNavBarItemColor: string
17731773
topNavBarItemActiveIndicatorColor: string
1774+
optionSeparatorColor: string
17741775
}
17751776

17761777
export interface ThemeVariables {

packages/ui-top-nav-bar/src/CanvasTopNav/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
DeepPartial,
4141
DrilldownTheme,
4242
OptionsItemTheme,
43+
OptionsSeparatorTheme,
4344
TopNavBarItemTheme
4445
} from '@instructure/shared-types'
4546

@@ -152,6 +153,9 @@ const CanvasTopNav = ({
152153
},
153154
Drilldown: {
154155
...(styles.drilldownOverride as DeepPartial<DrilldownTheme>)
156+
},
157+
'Options.Separator': {
158+
...(styles.optionSeparatorOverride as DeepPartial<OptionsSeparatorTheme>)
155159
}
156160
}
157161
}}

packages/ui-top-nav-bar/src/CanvasTopNav/props.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type CanvasTopNavStyle = ComponentStyle<
5050
| 'topNavBarItemOverride'
5151
| 'ltiIcon'
5252
| 'menuItems'
53+
| 'optionSeparatorOverride'
5354
>
5455

5556
type CanvasTopNavProps = CanvasTopNavOwnProps & PropsWithChildren

packages/ui-top-nav-bar/src/CanvasTopNav/styles.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ const generateStyle = (
5656
gap: '8px',
5757
alignItems: 'center'
5858
},
59+
optionSeparatorOverride: {
60+
background: componentTheme.optionSeparatorColor,
61+
margin: '0'
62+
},
5963
topNavBarItemOverride: {
6064
color: componentTheme.topNavBarItemColor,
6165
activeIndicatorColor: componentTheme.topNavBarItemActiveIndicatorColor

packages/ui-top-nav-bar/src/CanvasTopNav/theme.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ const generateComponentTheme = (theme: Theme): CanvasTopNavTheme => {
3535
optionColor: theme?.colors?.contrasts?.white1010,
3636
optionHighlightedLabelColorLti: theme?.colors?.contrasts?.grey125125,
3737
optionHighlightedLabelColor: theme?.colors?.contrasts?.white1010,
38-
drilldownBorderColorLti: theme?.colors?.contrasts?.grey1424,
38+
drilldownBorderColorLti: theme?.colors?.contrasts?.grey1111,
3939
drilldownBorderColor: theme?.colors?.contrasts?.grey100100,
40+
optionSeparatorColor: theme?.colors?.contrasts?.grey1424,
4041
topNavBarItemColor: theme?.colors?.contrasts?.grey125125,
4142
topNavBarItemActiveIndicatorColor: theme?.colors?.contrasts?.grey125125
4243
}

0 commit comments

Comments
 (0)