FluentUI 3.0 rc4 from CDN and theming #35713
-
|
Hi, how can I use themes with the CDN bundle version of fluentUI? It seems the default theme is not set and therefor all components are rendered as very simple elements. Also setTheme is not exported in the component.js. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
FluentUI 9 (and rc4 of 3.x) requires a |
Beta Was this translation helpful? Give feedback.
FluentUI 9 (and rc4 of 3.x) requires a
FluentProviderwrapper even with the CDN bundle. In the UMD bundle it's exposed asFluentUI.FluentProviderand themes asFluentUI.webLightTheme/webDarkTheme. Wrap your app's root with<FluentProvider theme={webLightTheme}>and components will pick up their default styles.setThemedoesn't exist in v9 — it's all context-based via the provider.