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:
parent
f06c4d1c12
commit
1a4cb05c64
18
src/renderer/themes/active.injectable.ts
Normal file
18
src/renderer/themes/active.injectable.ts
Normal 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;
|
||||
Loading…
Reference in New Issue
Block a user