Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.1 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.1 KB

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

sample picture

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" />