1.0.1 • Published 3 years ago

react-file-type-icons v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React File Type Icons

This package helps you in rendering icon on the basis of file-type.

npm

Installation

npm install react-file-type-icons --save

How to use it

import FTIcon from "react-file-type-icons";

const icon = () => {
  return <FTIcon fileName="foo.png" />;
};

Features

  • Renders file-type-icon either by passing full file name ( fileName ) or by passing file extension ( fileType )
  • Choose which type of Icon you want to render either Mono Color or Multi Color
  • Change the color of Icon of type monoColor

Properties & Configuration

PropertyDefaultNotes
fileNameundefinedAccepts full file name (if using this property then ignore fileType)
fileTypeundefinedAccepts file-type (extension) (if using this property then ignore fileName)
colorTypemonoColormonoColor/multiColor choose according to type of icon you want to render
colorundefined(inherit)Only for icons of colorType monoColor
size1em
classNameundefined

License

MIT