mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
feat: migrate Theme component to v11
- remove g80 theme option everywhere - utilize new `data-carbon-theme` attribute when applying theme - use cds instead of bx in places
This commit is contained in:
parent
21847da207
commit
3ae53de629
17 changed files with 38 additions and 60 deletions
|
@ -9,7 +9,7 @@
|
|||
try {
|
||||
const theme = localStorage.getItem("theme");
|
||||
|
||||
if (["white", "g10", "g80", "g90", "g100"].includes(theme)) {
|
||||
if (["white", "g10", "g90", "g100"].includes(theme)) {
|
||||
document.documentElement.setAttribute("theme", theme);
|
||||
document.documentElement.style.setProperty("color-scheme", ["white", "g10"].includes(theme) ? "light" : "dark");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue