@iconify/react
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -134,2 +134,6 @@ import { default as React_2 } from 'react'; | ||
/** | ||
* Load one icon, using Promise syntax | ||
*/ | ||
loadIcon: (icon: IconifyIconName | string) => Promise<Required<IconifyIcon>>; | ||
/** | ||
* Add API provider | ||
@@ -580,3 +584,10 @@ */ | ||
export declare const loadIcon: (icon: IconifyIconName | string) => LoadIconResult; | ||
/** | ||
* Cache for loadIcon promises | ||
*/ | ||
declare type LoadIconResult = Promise<Required<IconifyIcon>>; | ||
/** | ||
* Load icons | ||
@@ -583,0 +594,0 @@ */ |
@@ -765,3 +765,7 @@ 'use strict'; | ||
let localCounter = 0; | ||
const id = props.id; | ||
let id = props.id; | ||
if (typeof id === 'string') { | ||
// Convert '-' to '_' to avoid errors in animations | ||
id = id.replace(/-/g, '_'); | ||
} | ||
// Add icon stuff | ||
@@ -768,0 +772,0 @@ componentProps.dangerouslySetInnerHTML = { |
@@ -5,3 +5,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"license": "MIT", | ||
@@ -44,19 +44,19 @@ "bugs": "https://github.com/iconify/iconify/issues", | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.16.7", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-react": "^7.16.7", | ||
"@iconify/core": "^1.2.3", | ||
"@iconify/core": "^1.2.4", | ||
"@microsoft/api-extractor": "^7.19.4", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@types/react": "^17.0.3", | ||
"@types/react": "^17.0.38", | ||
"babel-jest": "^27.4.6", | ||
"jest": "^27.3.1", | ||
"jest": "^27.4.7", | ||
"react": "^17.0.2", | ||
"react-test-renderer": "^17.0.2", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.63.0", | ||
"typescript": "^4.5.4" | ||
"rollup": "^2.66.0", | ||
"typescript": "^4.5.5" | ||
}, | ||
"dependencies": { | ||
"cross-fetch": "^3.1.4" | ||
"cross-fetch": "^3.1.5" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
233674
7776
Updatedcross-fetch@^3.1.5