mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-23 18:36:18 +02:00
update theme generation logic
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import type { Appearance } from "../lib/theme/appearance";
|
||||
import { getCSSAppearance, subscribeToPreferredAppearance } from "../lib/theme/appearance";
|
||||
import type { Appearance } from "@yaakapp-internal/theme";
|
||||
import { getCSSAppearance, subscribeToPreferredAppearance } from "@yaakapp-internal/theme";
|
||||
|
||||
export function usePreferredAppearance() {
|
||||
const [preferredAppearance, setPreferredAppearance] = useState<Appearance>(getCSSAppearance());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { settingsAtom } from "@yaakapp-internal/models";
|
||||
import { resolveAppearance } from "@yaakapp-internal/theme";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { resolveAppearance } from "../lib/theme/appearance";
|
||||
import { usePreferredAppearance } from "./usePreferredAppearance";
|
||||
|
||||
export function useResolvedAppearance() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { settingsAtom } from "@yaakapp-internal/models";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { getResolvedTheme, getThemes } from "../lib/theme/themes";
|
||||
import { getResolvedTheme, getThemes } from "../lib/themes";
|
||||
import { usePluginsKey } from "./usePlugins";
|
||||
import { usePreferredAppearance } from "./usePreferredAppearance";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user