New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fdmg-ts-react-image-button

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fdmg-ts-react-image-button

ReactJS ImageButton component

latest
Source
npmnpm
Version
1.0.23
Version published
Maintainers
1
Created
Source

Build Status Coverage Status

npm version

fdmg-ts-react-image-button

ReactJS ImageButton component. This component renders an image with onClick hook.

Installation

  • Run npm i --save-dev fdmg-ts-react-image-button

or

  • Run yarn add fdmg-ts-react-image-button --dev

Usage

TypeScript

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

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

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

    clickHandler() {
        console.info('Image button clicked');
    }

    render() {
        return (
            <ImageButton
                src={"img/button.svg"} 
                onClick={this.clickHandler.bind(this)}
                className="image-btn btn"
                alt="Special button"
            />
        );
    }
}

Resulting HTML

<span class="image-btn btn"
      role="button"
      tabIndex="0"
      aria-label="Special button">
    <img alt="Special button" src="img/button.svg"/>
</span>

FAQs

Package last updated on 08 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts