mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce activeThemeInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
f06c4d1c12
commit
1a4cb05c64
1 file changed
+18
@@ -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;
|
||||||
Reference in new issue
Block a user