1.0.3 • Published 10 years ago
2r-image v1.0.3
2r-image
2R library image component implemented in React.
Instalation
2r-image is available as an npm package. Simply run npm install 2r-image command.
To use it in your project:
import image from '2r-image'; // ES6 syntax
var image = require('2r-image'); // ES5 syntaxUsage & API
The following props can be passed to the component:
src(String, required): the url of the imagewidth(Number): width of the image (defaults to'auto')height(Number): height of the image (defaults to'auto')alt(String): the value of thealtattribute (defaults to'')classes(String): a string of multiple classes, separated by space (defaults to'')
Examples
There is an examples folder inside the project with a minimum config. Steps to run:
Clone the project and
Run
npm installRun
gulp examplesNavigate to
http://localhost:5000
License
This software is released under the terms of WTFPL v2.0 license.