@fdmg/ts-react-image

ReactJS Image component

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
22May 7, 2020Nov 24, 2017Minified + gzip package size for @fdmg/ts-react-image in KB

Readme

fdmg-ts-react-image-button

Build Status Coverage Status npm version Greenkeeper badge

ReactJS Image component. This component renders an image.

Installation

  • Run npm i --save-dev @fdmg/ts-react-image

or

  • Run yarn add @fdmg/ts-react-image --dev

Usage

TypeScript

import * as React from 'react';
import Img from 'fdmg-ts-react-image';

export default class foo {
    public state: any;
    public props: any;

    constructor(props: any) {
        super(props);
        this.props = props;
    }

    render() {
        return (
            <Img
                src={"img/button.svg"} 
                className="image-btn btn"
                alt="Special button"
            />
        );
    }
}

Resulting HTML

    <img src="img/button.svg" alt="Special button" class="image-btn btn"/>

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.