⚙️ Improve `svg` types

This commit is contained in:
pheralb 2024-01-24 11:41:27 +00:00
parent dba9378833
commit 2392a92b77

View File

@ -1,23 +1,18 @@
import type { tCategory } from './categories';
type tCategoryPair = [tCategory, tCategory];
type CategoryPair = [tCategory, tCategory];
type CategoryTriple = [tCategory, tCategory, tCategory];
type ThemeOptions = {
dark: string;
light: string;
};
export interface iSVG {
id?: number;
title: string;
category: tCategory | tCategoryPair | CategoryTriple;
route:
| string // for backwards compat of when theme support was not added
| {
dark: string;
light: string;
};
wordmark?:
| string // for backwards compat of when theme support was not added
| {
dark: string;
light: string;
};
category: tCategory | CategoryPair | CategoryTriple;
route: string | ThemeOptions;
wordmark?: string | ThemeOptions;
url: string;
}