Skip to content

Commit

Permalink
examples.ConfigurationViewport: global theme switch => assign the new…
Browse files Browse the repository at this point in the history
… theme to the app main view #6338
  • Loading branch information
tobiu committed Jan 29, 2025
1 parent 80ed8e3 commit 77a122e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions examples/ConfigurationViewport.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,7 @@ class ConfigurationViewport extends Viewport {
if (target === 'cmp') {
me.exampleComponent.theme = newTheme
} else {
Neo.applyDeltas(me.appName, {
id : me.id, // the viewport can get imported into other apps, so an id makes sense for scoping
cls: {
add : [newTheme],
remove: [oldTheme]
}
})
me.app.mainView.theme = newTheme
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/Base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class Component extends Base {
*/
style_: null,
/**
* You can pass an used theme directly to any component,
* You can pass a used theme directly to any component,
* to style specific component trees differently from your main view.
* @member {String|null} theme_=null
*/
Expand Down

0 comments on commit 77a122e

Please sign in to comment.