Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-file-type-icons

Package Overview
Dependencies
Maintainers
10
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-file-type-icons

Fluent UI React file type icon set.

  • 8.0.0-beta.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
decreased by-53.31%
Maintainers
10
Weekly downloads
 
Created
Source

@fluentui/react-file-type-icons

File type icons for Fluent UI React (formerly Office UI Fabric React)

This package includes a collection of icons to represent file types.

Getting started

If you are using Fluent UI React components, you can make all file type icons available by calling the initializeFileTypeIcons function from the @fluentui/react-file-type-icons package:

import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons';

// Register icons and pull the fonts from the default SharePoint cdn.
initializeFileTypeIcons();

// ...or, register icons and pull the fonts from your own cdn:
initializeFileTypeIcons('https://my.cdn.com/path/to/icons/');

NOTE: Do not use the item-types-fluent icon set that was previously uploaded to the Fabric CDN; it is deprecated.

Usage in code

If you are using Fluent UI React, you can use the Icon component and pass in the corresponding icon properties to render a given icon.

import { Icon } from '@fluentui/react/lib/Icon';
import { getFileTypeIconProps } from '@fluentui/react-file-type-icons';

<Icon {...getFileTypeIconProps({ extension: 'docx', size: 16 })} />;

Notes

See GitHub for more details on the Fluent UI React project and packages within.

FAQs

Package last updated on 01 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc