Introduce activeThemeInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-08-18 10:38:30 -04:00
1 parent f06c4d1c12
commit 1a4cb05c64
1 file changed
+18
+18
View File
@@ -0,0 +1,18 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import themeStoreInjectable from "./store.injectable";
const activeThemeInjectable = getInjectable({
id: "active-theme",
instantiate: (di) => {
const store = di.inject(themeStoreInjectable);
return computed(() => store.activeTheme);
},
});
export default activeThemeInjectable;