@iconify/react
Advanced tools
Comparing version 2.0.0-rc.2 to 2.0.0-rc.3
@@ -261,4 +261,8 @@ import { HTMLProps } from 'react'; | ||
// Optional themes. | ||
themes?: IconifyThemes; | ||
// Optional themes (old format). | ||
themes?: LegacyIconifyThemes; | ||
// Optional themes (new format). Key is prefix or suffix, value is title. | ||
prefixes?: Record<string, string>; | ||
suffixes?: Record<string, string>; | ||
} | ||
@@ -276,17 +280,2 @@ | ||
/** | ||
* Optional themes. | ||
*/ | ||
declare interface IconifyThemes { | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
} | ||
/** | ||
* Icon transformations. | ||
@@ -329,2 +318,19 @@ * | ||
/** | ||
* Optional themes, old format. | ||
* | ||
* Deprecated because format is unnecessary complicated. Key is meaningless, suffixes and prefixes are mixed together. | ||
*/ | ||
declare interface LegacyIconifyThemes { | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
} | ||
export { } |
@@ -5,3 +5,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "2.0.0-rc.2", | ||
"version": "2.0.0-rc.3", | ||
"license": "MIT", | ||
@@ -30,10 +30,10 @@ "bugs": "https://github.com/iconify/iconify/issues", | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.12.1", | ||
"@babel/preset-react": "^7.12.5", | ||
"@iconify/core": "^1.0.0-rc.2", | ||
"@iconify/types": "^1.0.5", | ||
"@microsoft/api-extractor": "^7.11.2", | ||
"@babel/preset-env": "^7.12.7", | ||
"@babel/preset-react": "^7.12.7", | ||
"@iconify/core": "^1.0.0-rc.3", | ||
"@iconify/types": "^1.0.6", | ||
"@microsoft/api-extractor": "^7.12.0", | ||
"@rollup/plugin-buble": "^0.21.3", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-commonjs": "^16.0.0", | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"@types/react": "^16.9.55", | ||
@@ -44,6 +44,6 @@ "babel-jest": "^26.6.3", | ||
"react-test-renderer": "^16.14.0", | ||
"rollup": "^2.33.1", | ||
"rollup": "^2.33.3", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.0.5" | ||
"typescript": "^4.1.2" | ||
} | ||
} |
646763
16877