Skip to content

Commit 269f109

Browse files
authored
update doc to reflect setTheme function change (#32490)
1 parent 01cacb0 commit 269f109

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "docs: reflect setTheme change",
4+
"packageName": "@fluentui/web-components",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/web-components/src/_docs/developer/theming.stories.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ import { webLightTheme } from '@fluentui/tokens';
2929
setTheme(webLightTheme);
3030
```
3131

32-
If you need to set token values for an element which is not the document body, you can use `setThemeFor` and pass an element followed by the theme.
32+
If you need to set token values for an element which is not the document body, you can pass in the element as the second argument in `setTheme`.
3333

3434
```js
35-
import { setThemeFor } from '@fluentui/web-components';
36-
import { webLightTheme } from '@fluentui/tokens';
35+
import { setTheme } from '@fluentui/web-components';
36+
import { webDarkTheme } from '@fluentui/tokens';
3737

3838
const el = document.getElementById('my-element');
3939

40-
setThemeFor(el, webLightTheme);
40+
setTheme(webDarkTheme, el);
4141
```
4242

4343
### Do not use CSS variables directly

0 commit comments

Comments
 (0)