OfficeDev / microsoft-teams-ui-component-library

Component library enhanced experiences styled for use in Microsoft Teams custom applications.
MIT License
127 stars 30 forks source link

In production, HVCs don't receive a theme from consumer's Fluent UI #11

Closed thure closed 3 years ago

thure commented 3 years ago

When this package is consumed, and a developer uses e.g.:

import {Provider, teamsDarkTheme} from '@fluentui/react-northstar'
import {List} from '@fluentui/teams'

export default () => (
  <Provider theme={teamsDarkTheme}>
    <List \>
  </Provider>
)

The local theme applied for List receives {fontSizes: {}} instead of the expected dark theme. This only occurs when a consumer uses the built & packaged HVC library.

For now, the package applies the default theme if a proper global theme isn't received by the local theme, however this package should work with whatever theme the consumer supplies through the provider.