1.0.4 • Published 7 years ago

fdmg-ts-react-image v1.0.4

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

Build Status Coverage Status

npm version

fdmg-ts-react-image-button

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