From 3344d515277411123b490a4942bf41e93b737901 Mon Sep 17 00:00:00 2001 From: Simon Reinisch Date: Sun, 3 Sep 2023 14:14:43 +0200 Subject: [PATCH] refactor(core): refactor component types --- .../components/base/context-menu/ContextMenu.types.ts | 10 ++++++++++ src/app/components/base/context-menu/ContextMenu.vue | 8 ++++++-- src/app/components/base/context-menu/index.ts | 9 --------- src/app/components/base/currency-cell/CurrencyCell.vue | 2 +- .../base/draggable/{types.ts => Draggable.types.ts} | 0 src/app/components/base/draggable/Draggable.vue | 2 +- src/app/components/base/text-cell/TextCell.vue | 6 +----- .../pages/navigation/currency/ChangeCurrencyButton.vue | 2 +- .../pages/navigation/language/ChangeLanguageButton.vue | 2 +- src/app/pages/navigation/year/SelectYearButton.vue | 2 +- src/app/pages/shared/pane/BudgetGroup.vue | 2 +- src/app/pages/shared/pane/BudgetGroups.vue | 2 +- 12 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 src/app/components/base/context-menu/index.ts rename src/app/components/base/draggable/{types.ts => Draggable.types.ts} (100%) diff --git a/src/app/components/base/context-menu/ContextMenu.types.ts b/src/app/components/base/context-menu/ContextMenu.types.ts index fe4be99a..079bf0b9 100644 --- a/src/app/components/base/context-menu/ContextMenu.types.ts +++ b/src/app/components/base/context-menu/ContextMenu.types.ts @@ -1,5 +1,15 @@ +import { AppIcon } from '@components/base/icon/Icon.types'; + export const ContextMenuStoreKey = Symbol('ContextMenuStore'); export interface ContextMenuStore { close(): void; } + +export type ContextMenuOptionId = number | string; + +export interface ContextMenuOption { + id: ContextMenuOptionId; + icon?: AppIcon; + label?: string; +} diff --git a/src/app/components/base/context-menu/ContextMenu.vue b/src/app/components/base/context-menu/ContextMenu.vue index d269a96b..9dd8daac 100644 --- a/src/app/components/base/context-menu/ContextMenu.vue +++ b/src/app/components/base/context-menu/ContextMenu.vue @@ -30,11 +30,15 @@