diff --git a/src/components/desktop/ColorSelect.vue b/src/components/desktop/ColorSelect.vue index 6eb19d96..a4af3df0 100644 --- a/src/components/desktop/ColorSelect.vue +++ b/src/components/desktop/ColorSelect.vue @@ -38,7 +38,10 @@ - diff --git a/src/components/desktop/IconSelect.vue b/src/components/desktop/IconSelect.vue index 80da7267..c7e146d4 100644 --- a/src/components/desktop/IconSelect.vue +++ b/src/components/desktop/IconSelect.vue @@ -36,7 +36,11 @@ - diff --git a/src/core/color.ts b/src/core/color.ts index ed790b9d..165b5cbc 100644 --- a/src/core/color.ts +++ b/src/core/color.ts @@ -2,7 +2,7 @@ import type { TypeAndName } from './base.ts'; export type ColorValue = string; -export interface ColorInfo { +export interface ColorInfo extends Record { readonly color: ColorValue; } diff --git a/src/core/icon.ts b/src/core/icon.ts index 89a08b97..536874bd 100644 --- a/src/core/icon.ts +++ b/src/core/icon.ts @@ -1,10 +1,10 @@ export type LineAwesomeIconClassName = string; -export interface IconInfo { +export interface IconInfo extends Record { readonly icon: LineAwesomeIconClassName; } -export interface IconInfoWithId { +export interface IconInfoWithId extends IconInfo { readonly id: string; readonly icon: LineAwesomeIconClassName; } diff --git a/src/lib/icon.ts b/src/lib/icon.ts index 86106218..8c489d6d 100644 --- a/src/lib/icon.ts +++ b/src/lib/icon.ts @@ -1,6 +1,6 @@ import type { IconInfo, IconInfoWithId } from '@/core/icon.ts'; -export function getIconsInRows(allIconInfos: IconInfo[], itemPerRow: number): IconInfoWithId[][] { +export function getIconsInRows(allIconInfos: Record, itemPerRow: number): IconInfoWithId[][] { const ret: IconInfoWithId[][] = []; let rowCount = 0; diff --git a/src/lib/ui/desktop.ts b/src/lib/ui/desktop.ts index 5e37401f..d2681966 100644 --- a/src/lib/ui/desktop.ts +++ b/src/lib/ui/desktop.ts @@ -45,7 +45,7 @@ export function getCssValue(element: HTMLElement | null, name: string): string { return computedStyle.getPropertyValue(name); } -export function scrollToSelectedItem(parentEl: HTMLElement | null, containerSelector: string, selectedItemSelector: string): void { +export function scrollToSelectedItem(parentEl: HTMLElement | null, containerSelector: string | null, selectedItemSelector: string): void { if (!parentEl) { return; }