2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-13 22:18:24 +00:00

Add new suffixes/prefixes format to types

This commit is contained in:
Vjacheslav Trushkin 2020-11-05 20:11:56 +02:00
parent df883b6b84
commit a29b2bb493
2 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "@iconify/types", "name": "@iconify/types",
"description": "Types for Iconify data", "description": "Types for Iconify data",
"version": "1.0.5", "version": "1.0.6",
"author": "Vjacheslav Trushkin", "author": "Vjacheslav Trushkin",
"license": "(Apache-2.0 OR GPL-2.0)", "license": "(Apache-2.0 OR GPL-2.0)",
"main": "./index.js", "main": "./index.js",

View File

@ -161,9 +161,11 @@ export interface IconifyInfo {
} }
/** /**
* Optional themes. * Optional themes, old format.
*
* Deprecated because format is unnecessary complicated. Key is meaningless, suffixes and prefixes are mixed together.
*/ */
export interface IconifyThemes { export interface LegacyIconifyThemes {
// Key is unique string. // Key is unique string.
[index: string]: { [index: string]: {
// Theme title. // Theme title.
@ -207,8 +209,12 @@ export interface IconifyMetaData {
// Categories. Used for filtering icons. // Categories. Used for filtering icons.
categories?: IconifyCategories; categories?: IconifyCategories;
// Optional themes. // Optional themes (old format).
themes?: IconifyThemes; themes?: LegacyIconifyThemes;
// Optional themes (new format). Key is prefix or suffix, value is title.
prefixes?: Record<string, string>;
suffixes?: Record<string, string>;
} }
/** /**