diff --git a/src/types/svg.ts b/src/types/svg.ts index 0fc68f6..f4574a6 100644 --- a/src/types/svg.ts +++ b/src/types/svg.ts @@ -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; }