1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/notifications/show-info-notification.injectable.ts
Sebastian Malton 32b84d1658
Fix crash in HelmChartDetails (#5667)
* Fix crash in HelmChartDetails

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix bug in helm chart icon fallback

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Factor out HelmChartIcon for better reusability

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix compile error

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix remaining type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove HelmChart list figure background

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing dangerouslySetInnerHTML usage

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Snapshots update

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using currentColor from cascade instead of specific one

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-07-04 16:17:44 -04:00

27 lines
845 B
TypeScript

/**
* 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 type { ShowNotification } from "./notifications";
import { NotificationStatus } from "./notifications.store";
import notificationsStoreInjectable from "./notifications-store.injectable";
const showInfoNotificationInjectable = getInjectable({
id: "show-info-notification",
instantiate: (di): ShowNotification => {
const notificationsStore = di.inject(notificationsStoreInjectable);
return (message, customOpts = {}) =>
notificationsStore.add({
status: NotificationStatus.INFO,
timeout: 5000,
message,
...customOpts,
});
},
});
export default showInfoNotificationInjectable;