mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 15:17:58 +08:00
⚙️ Improve `svg
` types
This commit is contained in:
parent
dba9378833
commit
2392a92b77
@ -1,23 +1,18 @@
|
|||||||
import type { tCategory } from './categories';
|
import type { tCategory } from './categories';
|
||||||
|
|
||||||
type tCategoryPair = [tCategory, tCategory];
|
type CategoryPair = [tCategory, tCategory];
|
||||||
type CategoryTriple = [tCategory, tCategory, tCategory];
|
type CategoryTriple = [tCategory, tCategory, tCategory];
|
||||||
|
|
||||||
|
type ThemeOptions = {
|
||||||
|
dark: string;
|
||||||
|
light: string;
|
||||||
|
};
|
||||||
|
|
||||||
export interface iSVG {
|
export interface iSVG {
|
||||||
id?: number;
|
id?: number;
|
||||||
title: string;
|
title: string;
|
||||||
category: tCategory | tCategoryPair | CategoryTriple;
|
category: tCategory | CategoryPair | CategoryTriple;
|
||||||
route:
|
route: string | ThemeOptions;
|
||||||
| string // for backwards compat of when theme support was not added
|
wordmark?: string | ThemeOptions;
|
||||||
| {
|
|
||||||
dark: string;
|
|
||||||
light: string;
|
|
||||||
};
|
|
||||||
wordmark?:
|
|
||||||
| string // for backwards compat of when theme support was not added
|
|
||||||
| {
|
|
||||||
dark: string;
|
|
||||||
light: string;
|
|
||||||
};
|
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user