Skip to content

Commit 71f90ab

Browse files
committed
Updated generic icons
1 parent 8c2bc29 commit 71f90ab

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/controls/fileTypeIcon/FileTypeIcon.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,24 +188,23 @@ export class FileTypeIcon extends React.Component<IFileTypeIconProps, {}> {
188188
const iconImage = this._getIconImageName();
189189
// Check if the image was found, otherwise a generic image will be returned
190190
if (typeof iconImage.image !== 'undefined' && iconImage.image !== null) {
191-
// iconElm = <div style={{ display: 'inline-block' }} className={`ms-BrandIcon--${iconImage.size} ms-BrandIcon--${iconImage.image}`}></div>;
192191
iconElm = <Icon iconType={IconUIType.image} imageProps={{ className: `ms-BrandIcon--${iconImage.size} ms-BrandIcon--${iconImage.image}` }} />;
193192
} else {
194193
// Return a generic image
195194
let imgElm = <img />;
196195
// Check the size of the generic image which has to be returned
197196
switch (iconImage.size) {
198197
case 'icon16':
199-
imgElm = <img src={ICON_GENERIC_16} />;
198+
imgElm = <Icon iconType={IconUIType.image} imageProps={{ src: ICON_GENERIC_16 }} />;
200199
break;
201200
case 'icon48':
202-
imgElm = <img src={ICON_GENERIC_48} />;
201+
imgElm = <Icon iconType={IconUIType.image} imageProps={{ src: ICON_GENERIC_48}} />;
203202
break;
204203
case 'icon96':
205-
imgElm = <img src={ICON_GENERIC_96} />;
204+
imgElm = <Icon iconType={IconUIType.image} imageProps={{ src: ICON_GENERIC_96}} />;
206205
break;
207206
default:
208-
imgElm = <img src={ICON_GENERIC_16} />;
207+
imgElm = <Icon iconType={IconUIType.image} imageProps={{ src: ICON_GENERIC_16}} />;
209208
break;
210209
}
211210

@@ -218,7 +217,6 @@ export class FileTypeIcon extends React.Component<IFileTypeIconProps, {}> {
218217
} else {
219218
// Return the icon font element
220219
const iconClass = this._getIconClassName();
221-
// iconElm = <i className={`ms-Icon ms-Icon--${iconClass}`} aria-hidden='true'></i>;
222220
iconElm = <Icon iconName={iconClass} />;
223221
}
224222

0 commit comments

Comments
 (0)