vue3-progressbar icon indicating copy to clipboard operation
vue3-progressbar copied to clipboard

Dark mode

Open martinszeltins opened this issue 2 years ago • 1 comments

My app uses light and dark modes where the selector is added to html. Is there a way I can customize the progress bar depending on light/dark mode?

<html class="dark">
...

martinszeltins avatar Jul 19 '22 16:07 martinszeltins

you can watch for changes and style it like below

watch(
  () => store.darkMode,
  () => {
    if (store.darkMode) {
      document.getElementById("nBar").style.background =
        "linear-gradient(to right,rgb(29, 216, 69),rgb(30, 175, 78),rgb(17, 24, 39))";
    } else {
      document.getElementById("nBar").style.background =
        "linear-gradient(to right, rgb(29, 78, 216), rgb(30, 64, 175), rgb(17, 24, 39))";
    }
  }
)

atif0075 avatar Dec 10 '22 09:12 atif0075