Small bug in dark mode toggle component.
han109k opened this issue · comments
Han commented
Dark mode toggle works in reverse manner
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>
Michael Hladky commented
Hi!
I like that u used a perma link!😎
Are you interested in opening a PR?
😇
Han commented
Sure, will do asap!