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:
Enrico Sacchetti 2024-01-10 16:12:19 -05:00
commit 3ae53de629
17 changed files with 38 additions and 60 deletions

View file

@ -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");
}