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
1111import React from 'react' ;
1212
1313import SLDSSettings from './SLDSSettings' ;
14+ import SLDSUtilityIcon from './SLDSUtilityIcon' ;
1415
1516
1617export const ButtonIcon = React . createClass ( {
@@ -72,6 +73,9 @@ export const Icon = React.createClass({
7273 className += ' slds-icon--' + this . props . position ;
7374 }
7475 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+ }
7579 return < span className = 'slds-icon__container' > < svg aria-hidden = 'true' className = { className } style = { this . props . style } dangerouslySetInnerHTML = { { __html : useTag } } /> </ span > ;
7680 }
7781
@@ -82,7 +86,7 @@ export const InputIcon = React.createClass({
8286 render ( ) {
8387 const useTag = '<use xlink:href="' + SLDSSettings . getAssetsPath ( ) + 'icons/utility-sprite/svg/symbols.svg#' + this . props . name + '" />' ;
8488 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 } /> ;
8690 }
8791
8892} ) ;
You can’t perform that action at this time.
0 commit comments