How to use the @uifabric/file-type-icons.getFileTypeIconProps function in @uifabric/file-type-icons

To help you get started, we’ve selected a few @uifabric/file-type-icons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoftgraph / msgraph-training-smartui-components / LabFiles / Cards / Groups / GroupDetails.tsx View on Github external
name: doc.title,
        url: doc.webUrl,
        previewImageSrc: doc.thumbnailUrl,
        iconSrc: globalSettings.icons[iconProps.iconName].code.props.src   // hack for file-type-icons
      };
      recentDocs.previewImages.push(previewImage);
      documentCardDocTitle = ;
    }
    else {

      let docs = this.props.group.driveRecentItems;
      for (var i = 0; i < docs.length; i++) {
        let iconProps: IIconProps = {};
        switch (docs[i].fileType) {
          case "folder":
            iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
            break;
          default:
            iconProps = getFileTypeIconProps({ extension: docs[i].fileType, size: 16 });
            break;
        }

        let previewImage: IDocumentCardPreviewImage = {
          name: docs[i].title,
          url: docs[i].webUrl,
          iconSrc: globalSettings.icons[iconProps.iconName].code.props.src   // hack for file-type-icons
        };
        recentDocs.previewImages.push(previewImage);
      }
    }

    libraryActivity = (
github microsoftgraph / msgraph-training-smartui-components / Demos / 03-adaptive-cards / GraphUI / Components / GroupDetails.tsx View on Github external
private getIconProps(fileSuffix: string): IIconProps {
    let iconProps: IIconProps = {};

    switch (fileSuffix) {
      case "folder":
        iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
        break;
      default:
        iconProps = getFileTypeIconProps({ extension: fileSuffix, size: 16 });
        break;
    }
    return iconProps;
  }
}
github microsoftgraph / msgraph-training-smartui-components / LabFiles / Cards / Groups / GroupDetails.tsx View on Github external
private getIconProps(fileSuffix: string): IIconProps {
    let iconProps: IIconProps = {};

    switch (fileSuffix) {
      case "folder":
        iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 16 });
        break;
      default:
        iconProps = getFileTypeIconProps({ extension: fileSuffix, size: 16 });
        break;
    }
    return iconProps;
  }