File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11
11
import React from 'react' ;
12
12
13
13
import SLDSSettings from './SLDSSettings' ;
14
+ import SLDSUtilityIcon from './SLDSUtilityIcon' ;
14
15
15
16
16
17
export const ButtonIcon = React . createClass ( {
@@ -72,6 +73,9 @@ export const Icon = React.createClass({
72
73
className += ' slds-icon--' + this . props . position ;
73
74
}
74
75
className = className + ' slds-icon-' + this . props . category + '-' + ( this . props . theme || this . props . name ) ;
76
+ if ( this . props . category === 'utility' ) {
77
+ return < span className = 'slds-icon__container' > < SLDSUtilityIcon name = { this . props . name } aria-hidden = 'true' className = { className } style = { this . props . style } /> </ span > ;
78
+ }
75
79
return < span className = 'slds-icon__container' > < svg aria-hidden = 'true' className = { className } style = { this . props . style } dangerouslySetInnerHTML = { { __html : useTag } } /> </ span > ;
76
80
}
77
81
@@ -82,7 +86,7 @@ export const InputIcon = React.createClass({
82
86
render ( ) {
83
87
const useTag = '<use xlink:href="' + SLDSSettings . getAssetsPath ( ) + 'icons/utility-sprite/svg/symbols.svg#' + this . props . name + '" />' ;
84
88
const className = 'slds-input__icon slds-icon-text-default' ;
85
- return < svg aria-hidden = 'true' className = { className } dangerouslySetInnerHTML = { { __html : useTag } } /> ;
89
+ return < SLDSUtilityIcon name = { this . props . name } aria-hidden = 'true' className = { className } /> ;
86
90
}
87
91
88
92
} ) ;
You can’t perform that action at this time.
0 commit comments