state+components: reimplement 'isDark' as a selector

We now have a consolidated source of truth for whether the UI should us
dark mode to accomodate a light icon color. This is a recoil selector
that derives from iconColorAtom.

In addition, we renamed styleQueryAtom -> iconStyleAtom for consistency.
This commit is contained in:
rektdeckard
2020-09-09 20:00:58 -04:00
parent 3cfbb34713
commit 361cacdabd
6 changed files with 29 additions and 22 deletions

View File

@@ -6,7 +6,7 @@ export const searchQueryAtom = atom<string>({
default: "",
});
export const styleQueryAtom = atom<IconStyle>({
export const iconStyleAtom = atom<IconStyle>({
key: "styleQueryAtom",
default: IconStyle.REGULAR,
});