Skip to content

Commit

Permalink
WIP(shared-types,ui-top-nav-bar): remove theme
Browse files Browse the repository at this point in the history
  • Loading branch information
joyenjoyer committed Nov 7, 2023
1 parent 5a580ae commit 86e82ab
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 52 deletions.
4 changes: 0 additions & 4 deletions packages/shared-types/src/ComponentThemeVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,6 @@ export type TopNavBarBrandTheme = {
focusOutlineInset: string | 0
}

export type TopNavBarBreadcrumbTheme = {
color: Colors['textDarkest']
}

export type TopNavBarItemTheme = {
fontSize: Typography['fontSizeMedium']
fontFamily: Typography['fontFamily']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
import TopNavBar from '../index'
import { withStyle, jsx } from '@instructure/emotion'
import generateStyle from '../TopNavBarBreadcrumb/styles'
import generateComponentTheme from '../TopNavBarBreadcrumb/theme'
import { testable } from '@instructure/ui-testable'
import {
IconArrowOpenStartLine,
Expand All @@ -50,7 +49,7 @@ id: TopNavBar.Breadcrumb
---
@module TopNavBarBreadcrumb
**/
@withStyle(generateStyle, generateComponentTheme)
@withStyle(generateStyle, null)
@testable()
class TopNavBarBreadcrumb extends Component<
TopNavBarBreadcrumbProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import { TopNavBarContextType } from '../TopNavBarContext'
import {
ChildrenOfType,
OtherHTMLAttributes,
PropValidators,
TopNavBarBreadcrumbTheme
PropValidators
} from '@instructure/shared-types'
import TopNavBarBreadcrumb from './index'
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
Expand All @@ -39,7 +38,7 @@ import { Breadcrumb } from '@instructure/ui-breadcrumb'
import type { BreadcrumbProps } from '@instructure/ui-breadcrumb'

type TopNavBarBreadcrumbProps = TopNavBarBreadcrumbOwnProps &
WithStyleProps<TopNavBarBreadcrumbTheme, TopNavBarBreadcrumbStyle> &
WithStyleProps<null, TopNavBarBreadcrumbStyle> &
OtherHTMLAttributes<TopNavBarBreadcrumbOwnProps>

type TopNavBarBreadcrumbState = { active: boolean }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ import {
TopNavBarBreadcrumbStyle,
TopNavBarBreadcrumbStyleProps
} from './props'
import { TopNavBarBreadcrumbTheme } from '@instructure/shared-types'

const generateStyle = (
_componentTheme: TopNavBarBreadcrumbTheme,
_props: TopNavBarBreadcrumbProps,
_state: TopNavBarBreadcrumbStyleProps
): TopNavBarBreadcrumbStyle => {
Expand Down
40 changes: 0 additions & 40 deletions packages/ui-top-nav-bar/src/TopNavBar/TopNavBarBreadcrumb/theme.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ const commonPropTypes: PropValidators<CommonPropKeys> = {
renderMenuItems: ChildrenPropTypes.oneOf([TopNavBarMenuItems]),
renderActionItems: ChildrenPropTypes.oneOf([TopNavBarActionItems]),
renderUser: ChildrenPropTypes.oneOf([TopNavBarUser]),
//TODO BreadCrumb wrapper
renderBreadcrumb: ChildrenPropTypes.oneOf([TopNavBarBreadcrumb]),
navLabel: PropTypes.string,
elementRef: PropTypes.func
Expand Down

0 comments on commit 86e82ab

Please sign in to comment.