mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +08:00
⚙️ Improve `svg
` types
This commit is contained in:
parent
dba9378833
commit
2392a92b77
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user