tingle-icon
Advanced tools
Comparing version 0.1.1 to 0.2.2
@@ -0,2 +1,7 @@ | ||
0.2.2 / 2015-11-19 | ||
================== | ||
* update use way | ||
* 调整使用内嵌在页面中的svg集合的方式,调整为使用外链资源地址 | ||
0.1.1 / 2015-09-11 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "tingle-icon", | ||
"version": "0.1.1", | ||
"description": "svg icon", | ||
"version": "0.2.2", | ||
"description": "svg icon 解决方案。", | ||
"repository": "https://github.com/tinglejs/tingle-icon.git", | ||
@@ -33,4 +33,7 @@ "author": { | ||
"react": "^0.13.3", | ||
"tingle-context":"0.1.0" | ||
"tingle-context":"0.1.3" | ||
}, | ||
"peerDependencies": { | ||
"tingle-context": ">=0.1.3" | ||
}, | ||
"scripts": { | ||
@@ -37,0 +40,0 @@ "start": "gulp d" |
@@ -9,2 +9,4 @@ /** | ||
let classnames = require('classnames'); | ||
let Tingle = require('tingle-context'); | ||
class Icon extends React.Component { | ||
@@ -21,3 +23,3 @@ | ||
})} dangerouslySetInnerHTML={{ | ||
__html: '<use xlink:href="#' + t.props.id + '"/>' | ||
__html: '<use xlink:href="' + Tingle.getGlobal('svgPath') + '#' + t.props.id + '"/>' | ||
}}/> | ||
@@ -24,0 +26,0 @@ } |
52
5332
3
9