Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Now scoped.
Browse files Browse the repository at this point in the history
  • Loading branch information
willemliu committed Dec 18, 2017
1 parent d1e34d9 commit 920e645
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 34 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[![Build Status](https://travis-ci.org/FDMediagroep/fdmg-ts-react-image-button.svg?branch=master)](https://travis-ci.org/FDMediagroep/fdmg-ts-react-image-button)
[![Coverage Status](https://coveralls.io/repos/github/FDMediagroep/fdmg-ts-react-image-button/badge.svg?branch=master)](https://coveralls.io/github/FDMediagroep/fdmg-ts-react-image-button?branch=master)

[![npm version](https://badge.fury.io/js/fdmg-ts-react-image-button.svg)](https://badge.fury.io/js/fdmg-ts-react-image-button)
[![npm version](https://badge.fury.io/js/%40fdmg%2Fts-react-image-button.svg)](https://badge.fury.io/js/%40fdmg%2Fts-react-image-button)

# fdmg-ts-react-image-button
[ReactJS](https://reactjs.org/) ImageButton component. This component renders an image with onClick hook.

## Installation
- Run `npm i --save-dev fdmg-ts-react-image-button`
- Run `npm i --save-dev @fdmg/ts-react-image-button`

or

- Run `yarn add fdmg-ts-react-image-button --dev`
- Run `yarn add @fdmg/ts-react-image-button --dev`

## Usage
### TypeScript
Expand Down
4 changes: 2 additions & 2 deletions dist/ImageButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var fdmg_ts_react_image_1 = require("fdmg-ts-react-image");
var ts_react_image_1 = require("@fdmg/ts-react-image");
/**
* Renders an image with an onClick hook for parent component.
*/
Expand All @@ -24,7 +24,7 @@ var ImageButton = /** @class */ (function (_super) {
}
ImageButton.prototype.render = function () {
return (React.createElement("span", { onClick: this.props.onClick, className: this.props.className, role: "button", tabIndex: this.props.tabIndex ? this.props.tabIndex : 0, "aria-label": this.props.alt },
React.createElement(fdmg_ts_react_image_1.default, { alt: this.props.alt, src: this.props.src })));
React.createElement(ts_react_image_1.default, { alt: this.props.alt, src: this.props.src })));
};
return ImageButton;
}(React.Component));
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fdmg-ts-react-image-button",
"version": "1.0.23",
"name": "@fdmg/ts-react-image-button",
"version": "1.0.24",
"description": "ReactJS ImageButton component",
"main": "dist/ImageButton.js",
"types": "dist/ImageButton.d.ts",
Expand All @@ -15,15 +15,18 @@
"type": "git",
"url": "git@github.com:FDMediagroep/fdmg-ts-react-image-button.git"
},
"publishConfig": {
"access": "public"
},
"author": "Willem Liu, Alexander Eerenberg",
"license": "ISC",
"devDependencies": {
"@types/jest": "^21.1.8",
"@types/react": "^16.0.28",
"@types/react": "^16.0.31",
"coveralls": "^3.0.0",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.2.2",
"enzyme-to-json": "^3.3.0",
"fs-extra": "^4.0.3",
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
Expand Down Expand Up @@ -62,6 +65,6 @@
"mapCoverage": true
},
"dependencies": {
"fdmg-ts-react-image": "^1.0.4"
"@fdmg/ts-react-image": "^1.0.5"
}
}
2 changes: 1 addition & 1 deletion src/ImageButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {MouseEvent} from "react";
import Img from "fdmg-ts-react-image";
import Img from "@fdmg/ts-react-image";

export interface Props {
className?: string;
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# yarn lockfile v1


"@fdmg/ts-react-image@^1.0.5":
version "1.0.5"
resolved "https://registry.npmjs.org/@fdmg/ts-react-image/-/ts-react-image-1.0.5.tgz#fdec7250128489691cc7185bb0792eb5e193be9d"

"@types/jest@^21.1.8":
version "21.1.8"
resolved "https://registry.npmjs.org/@types/jest/-/jest-21.1.8.tgz#d497213725684f1e5a37900b17a47c9c018f1a97"
Expand All @@ -10,9 +14,9 @@
version "8.0.57"
resolved "https://registry.npmjs.org/@types/node/-/node-8.0.57.tgz#e5d8b4dc112763e35cfc51988f4f38da3c486d99"

"@types/react@^16.0.28":
version "16.0.28"
resolved "https://registry.npmjs.org/@types/react/-/react-16.0.28.tgz#eb0b31272528da8f20477ec27569c4f767315b33"
"@types/react@^16.0.31":
version "16.0.31"
resolved "https://registry.npmjs.org/@types/react/-/react-16.0.31.tgz#5285da62f3ac62b797f6d0729a1d6181f3180c3e"

abab@^1.0.3:
version "1.0.4"
Expand Down Expand Up @@ -788,9 +792,9 @@ enzyme-adapter-utils@^1.1.0:
object.assign "^4.0.4"
prop-types "^15.5.10"

enzyme-to-json@^3.2.2:
version "3.2.2"
resolved "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.2.2.tgz#110047c68dda97aaeb7af3cee7d995fe3d17e82a"
enzyme-to-json@^3.3.0:
version "3.3.0"
resolved "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.3.0.tgz#553e23a09ffb4b0cf09287e2edf9c6539fddaa84"
dependencies:
lodash "^4.17.4"

Expand Down Expand Up @@ -960,10 +964,6 @@ fbjs@^0.8.16:
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

fdmg-ts-react-image@^1.0.4:
version "1.0.4"
resolved "https://registry.npmjs.org/fdmg-ts-react-image/-/fdmg-ts-react-image-1.0.4.tgz#a8ca8e3c250ec22759d27e79abdb317fdd4aff89"

filename-regex@^2.0.0:
version "2.0.1"
resolved "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
Expand Down

0 comments on commit 920e645

Please sign in to comment.