Skip to content

minhazmiraz/file-extension-icon-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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