tastejs / angular-movies

A Angular Movies App Optimized for Performance

Home Page:https://angular-movies-a12d3.web.app/list/category/popular

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small bug in dark mode toggle component.

han109k opened this issue · comments

commented

Dark mode toggle works in reverse manner

  • Light theme, the toggle shows it's in dark mode
    Screen Shot 2022-10-21 at 15 24 33

  • Dark theme, the toggle shows it's in light mode
    Screen Shot 2022-10-21 at 15 24 46

I've also checked with other demos and they work correctly.

Possible quick fix

/*
https://github.com/tastejs/angular-movies/blob/c72d7197677c3698a9cd0fcb22920b05460c1fbc/projects/movies/src/app/ui/component/dark-mode-toggle/dark-mode-toggle.component.ts
*/
      <span class="toggle">
        <input
          *rxLet="isLightTheme$; let isLightTheme; strategy: 'immediate'"
          class="toggle-track"
          type="checkbox"
          id="dark-mode"
          [checked]="!isLightTheme"
          (change)="setChecked(!isLightTheme)"
        />
        <label style="color: transparent" for="dark-mode">
          Toggle Switch
        </label>
      </span>

Hi!
I like that u used a perma link!😎
Are you interested in opening a PR?
😇

commented

Sure, will do asap!