File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1+ import { themeSwitcher } from "@siemens/ix" ;
12import { useIxTheme as getIxTheme } from "@siemens/ix-aggrid" ;
23import { IxApplicationContext } from "@siemens/ix-react" ;
34import "@siemens/ix/dist/siemens-ix/siemens-ix-core.css" ;
@@ -29,7 +30,7 @@ function optionalTheme() {
2930 script . type = "module" ;
3031 document . head . appendChild ( script ) ;
3132
32- document . body . classList . add ( "theme- brand-dark ") ;
33+ themeSwitcher . setTheme ( " brand") ;
3334 }
3435}
3536
Original file line number Diff line number Diff line change 77 * LICENSE file in the root directory of this source tree.
88 */
99
10+ import useShowDemoMessage from "@/hooks/demoMessage" ;
11+ import { themeSwitcher } from "@siemens/ix" ;
1012import { IxRadio , IxRadioGroup , IxTypography } from "@siemens/ix-react" ;
11- import brand from "./brand.png" ;
12- import classic from "./classic.png" ;
13- import styles from "./styles.module.css" ;
1413import clsx from "clsx" ;
1514import { useEffect , useState } from "react" ;
1615import { useTranslation } from "react-i18next" ;
17- import useShowDemoMessage from "@/hooks/demoMessage" ;
16+ import brand from "./brand.png" ;
17+ import classic from "./classic.png" ;
18+ import styles from "./styles.module.css" ;
1819
1920function ThemeButton ( props : {
2021 name : string ;
@@ -65,7 +66,7 @@ export default function UserSettings() {
6566 ) ;
6667
6768 useEffect ( ( ) => {
68- document . documentElement . setAttribute ( "data-ix-theme" , currentTheme ) ;
69+ themeSwitcher . setTheme ( currentTheme ) ;
6970 } , [ currentTheme ] ) ;
7071
7172 function changeTheme ( theme : string ) {
You can’t perform that action at this time.
0 commit comments