Skip to content

Commit 77a122e

Browse files
committed
examples.ConfigurationViewport: global theme switch => assign the new theme to the app main view #6338
1 parent 80ed8e3 commit 77a122e

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

examples/ConfigurationViewport.mjs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,7 @@ class ConfigurationViewport extends Viewport {
208208
if (target === 'cmp') {
209209
me.exampleComponent.theme = newTheme
210210
} else {
211-
Neo.applyDeltas(me.appName, {
212-
id : me.id, // the viewport can get imported into other apps, so an id makes sense for scoping
213-
cls: {
214-
add : [newTheme],
215-
remove: [oldTheme]
216-
}
217-
})
211+
me.app.mainView.theme = newTheme
218212
}
219213
}
220214
}

src/component/Base.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class Component extends Base {
331331
*/
332332
style_: null,
333333
/**
334-
* You can pass an used theme directly to any component,
334+
* You can pass a used theme directly to any component,
335335
* to style specific component trees differently from your main view.
336336
* @member {String|null} theme_=null
337337
*/

0 commit comments

Comments
 (0)