1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/dashboard/client/components/dock/create-resource.store.ts
Jari Kolehmainen 1d0815abd2
Lens app source code (#119)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-03-15 09:52:02 +02:00

27 lines
674 B
TypeScript

import { autobind } from "../../utils";
import { DockTabStore } from "./dock-tab.store";
import { dockStore, IDockTab, TabKind } from "./dock.store";
@autobind()
export class CreateResourceStore extends DockTabStore<string> {
constructor() {
super({
storageName: "create_resource"
});
}
}
export const createResourceStore = new CreateResourceStore();
export function createResourceTab(tabParams: Partial<IDockTab> = {}) {
return dockStore.createTab({
kind: TabKind.CREATE_RESOURCE,
title: "Create resource",
...tabParams
});
}
export function isCreateResourceTab(tab: IDockTab) {
return tab && tab.kind === TabKind.CREATE_RESOURCE;
}