Skip to content

Commit

Permalink
chore: revert theme for document
Browse files Browse the repository at this point in the history
  • Loading branch information
bualoy-napat committed Dec 20, 2024
1 parent 6eb988e commit b0391fc
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 18 deletions.
1 change: 0 additions & 1 deletion documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"dependencies": {
"@refinitiv-ui/core": "^7.5.1",
"@refinitiv-ui/ds-theme": "^7.0.0",
"@refinitiv-ui/elements": "^7.13.5",
"@refinitiv-ui/halo-theme": "^7.5.1",
"@refinitiv-ui/phrasebook": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion documents/src/elements/dark.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '@refinitiv-ui/ds-theme/dark/imports/all-elements.js';
import '@refinitiv-ui/halo-theme/dark/imports/all-elements.js';
2 changes: 1 addition & 1 deletion documents/src/elements/light.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '@refinitiv-ui/ds-theme/light/imports/all-elements.js';
import '@refinitiv-ui/halo-theme/light/imports/all-elements.js';
4 changes: 2 additions & 2 deletions documents/src/templates/import-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ name: import-elements
*/

import '/resources/elements/index.js';
import { ds } from '/theme-loader.js';
await ds();
import { halo } from '/theme-loader.js';
await halo();
13 changes: 1 addition & 12 deletions documents/src/theme-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ const ThemePackage = {
light: () => `/resources/elements/light.js`,
dark: () => `/resources/elements/dark.js`,
},
ds: {
light: () => `/resources/elements/light.js`,
dark: () => `/resources/elements/dark.js`,
}
};

/**
Expand Down Expand Up @@ -42,14 +38,7 @@ const halo = async () => {
}
};

const ds = async () => {
if (themeVariant === 'light') {
await import(ThemePackage.ds.light());
} else {
await import(ThemePackage.ds.dark());
}
};

applyThemeWrapper();

export { themeVariant, halo, ds };
export { themeVariant, halo };
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b0391fc

Please sign in to comment.