Skip to content

Commit d890187

Browse files
javier-godoypaodb
authored andcommitted
feat(demo): add support for dynamic theme switching
1 parent ae6302f commit d890187

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* Upload Helper Add-on
44
* %%
5-
* Copyright (C) 2022 - 2024 Flowing Code
5+
* Copyright (C) 2022 - 2026 Flowing Code
66
* %%
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -19,11 +19,20 @@
1919
*/
2020
package com.flowingcode.vaadin.addons;
2121

22+
import com.flowingcode.vaadin.addons.demo.DynamicTheme;
2223
import com.vaadin.flow.component.page.AppShellConfigurator;
2324
import com.vaadin.flow.component.page.Push;
25+
import com.vaadin.flow.server.AppShellSettings;
2426

2527
@SuppressWarnings("serial")
2628
@Push
2729
public class AppShellConfiguratorImpl implements AppShellConfigurator {
2830

31+
@Override
32+
public void configurePage(AppShellSettings settings) {
33+
if (DynamicTheme.isFeatureSupported()) {
34+
DynamicTheme.LUMO.initialize(settings);
35+
}
36+
}
37+
2938
}

0 commit comments

Comments
 (0)