1.1.6 • Published 2 years ago

file-extension-icon-js v1.1.6

Weekly downloads
19
License
-
Repository
github
Last release
2 years ago

File-Extension-Icon-JS

Use folder name and file extension specific Material-icon and vscode-icon.

Inspired by vscode-icons-js and file-icons-js

Installation

npm i file-extension-icon-js

Usage

import {
  getMaterialFileIcon,
  getMaterialFolderIcon,
  getVSIFileIcon,
  getVSIFolderIcon,
} from "file-extension-icon-js";

//File Icon
<img src=`${getMaterialFileIcon('index.js')}` alt="js" width="24" />

//Folder Icon
<img src=`${getMaterialFolderIcon('android')}` alt="android" width="24" />

//Open Folder Icon
<img src=`${getMaterialFolderIcon('android', 1)}` alt="android" width="24" />

//File Icon
<img src=`${getVSIFileIcon('index.js')}` alt="js" width="24" />

//Folder Icon
<img src=`${getVSIFolderIcon('android')}` alt="android" width="24" />

//Open Folder Icon
<img src=`${getVSIFolderIcon('android', 1)}` alt="android" width="24" />