react-file-type-icons
v1.0.1
Published
Renders file-type-icon
Readme
React File Type Icons
This package helps you in rendering icon on the basis of file-type.
Installation
npm install react-file-type-icons --saveHow 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
| Property | Default | Notes |
| ----------- | -------------------- | ----------------------------------------------------------------------------- |
| fileName | undefined | Accepts full file name (if using this property then ignore fileType) |
| fileType | undefined | Accepts file-type (extension) (if using this property then ignore fileName) |
| colorType | monoColor | monoColor/multiColor choose according to type of icon you want to render |
| color | undefined(inherit) | Only for icons of colorType monoColor |
| size | 1em | |
| className | undefined | |
License
MIT
