diff --git a/src/components/desktop/AmountInput.vue b/src/components/desktop/AmountInput.vue index 2e7a10f8..320ba270 100644 --- a/src/components/desktop/AmountInput.vue +++ b/src/components/desktop/AmountInput.vue @@ -37,12 +37,13 @@ import { useI18n } from '@/locales/helpers.ts'; import type { CurrencyPrependAndAppendText } from '@/core/currency.ts'; import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts'; import { removeAll } from '@/lib/common.ts'; +import type { ComponentDensity } from '@/lib/ui/desktop.ts'; import logger from '@/lib/logger.ts'; const props = defineProps<{ class?: string; color?: string; - density?: string; + density?: ComponentDensity; currency: string; showCurrency?: boolean; label?: string; diff --git a/src/components/desktop/TwoColumnSelect.vue b/src/components/desktop/TwoColumnSelect.vue index 75e5b41e..b49187ff 100644 --- a/src/components/desktop/TwoColumnSelect.vue +++ b/src/components/desktop/TwoColumnSelect.vue @@ -91,7 +91,7 @@ import { getItemByKeyValue, getNameByKeyValue } from '@/lib/common.ts'; -import { scrollToSelectedItem } from '@/lib/ui/desktop.ts'; +import { type ComponentDensity, type InputVariant, scrollToSelectedItem } from '@/lib/ui/desktop.ts'; import { mdiChevronRight, @@ -99,8 +99,8 @@ import { } from '@mdi/js'; interface DesktopTwoColumnListItemSelectionProps extends CommonTwoColumnListItemSelectionProps { - density?: string; - variant?: string; + density?: ComponentDensity; + variant?: InputVariant; disabled?: boolean; readonly?: boolean; label?: string; diff --git a/src/lib/ui/desktop.ts b/src/lib/ui/desktop.ts index dc8e83dc..9227319c 100644 --- a/src/lib/ui/desktop.ts +++ b/src/lib/ui/desktop.ts @@ -1,3 +1,6 @@ +export type ComponentDensity = 'default' | 'comfortable' | 'compact'; +export type InputVariant = 'filled' | 'underlined' | 'outlined' | 'plain' | 'solo' | 'solo-inverted' | 'solo-filled'; + export function getOuterHeight(element: HTMLElement | null): number { if (!element) { return 0;