Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-github-fork-ribbon

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-github-fork-ribbon - npm Package Compare versions

Comparing version 0.4.5 to 0.5.0

coverage/clover.xml

85

component/index.js

@@ -20,57 +20,56 @@ 'use strict';

var positionMapping = {
left: [_ribbonStyle.GitHubForkRibbon.leftStyle, _ribbonStyle.GitHubForkRibbonWrapper.leftStyle],
right: [_ribbonStyle.GitHubForkRibbon.rightStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightStyle],
'left-bottom': [_ribbonStyle.GitHubForkRibbon.leftBottomStyle, _ribbonStyle.GitHubForkRibbonWrapper.leftBottomStyle],
'right-bottom': [_ribbonStyle.GitHubForkRibbon.rightBottomStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightBottomStyle]
left: [_ribbonStyle.RibbonStyle.leftStyle, _ribbonStyle.RibbonStyleWrapper.leftStyle],
right: [_ribbonStyle.RibbonStyle.rightStyle, _ribbonStyle.RibbonStyleWrapper.rightStyle],
'left-bottom': [_ribbonStyle.RibbonStyle.leftBottomStyle, _ribbonStyle.RibbonStyleWrapper.leftBottomStyle],
'right-bottom': [_ribbonStyle.RibbonStyle.rightBottomStyle, _ribbonStyle.RibbonStyleWrapper.rightBottomStyle]
};
var colorMapping = {
red: _ribbonStyle.GitHubForkRibbon.redColor,
orange: _ribbonStyle.GitHubForkRibbon.orangeColor,
black: _ribbonStyle.GitHubForkRibbon.blackColor,
green: _ribbonStyle.GitHubForkRibbon.greenColor
red: _ribbonStyle.RibbonStyle.redColor,
orange: _ribbonStyle.RibbonStyle.orangeColor,
black: _ribbonStyle.RibbonStyle.blackColor,
green: _ribbonStyle.RibbonStyle.greenColor
};
exports.default = global.GitHubForkRibbon = _react2.default.createClass({
displayName: 'GitHubForkRibbon',
render: function render() {
var _props = this.props,
_props$position = _props.position,
position = _props$position === undefined ? 'right' : _props$position,
href = _props.href,
target = _props.target,
_props$color = _props.color,
color = _props$color === undefined ? 'red' : _props$color,
other = _objectWithoutProperties(_props, ['position', 'href', 'target', 'color']);
var GitHubForkRibbon = function GitHubForkRibbon(_ref) {
var _ref$position = _ref.position,
position = _ref$position === undefined ? 'right' : _ref$position,
href = _ref.href,
target = _ref.target,
_ref$color = _ref.color,
color = _ref$color === undefined ? 'red' : _ref$color,
children = _ref.children,
other = _objectWithoutProperties(_ref, ['position', 'href', 'target', 'color', 'children']);
var positionStyle = positionMapping[position] || [_ribbonStyle.GitHubForkRibbon.rightStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightStyle];
var colorStyle = colorMapping[color] || _ribbonStyle.GitHubForkRibbon.redColor;
var positionStyle = positionMapping[position] || [_ribbonStyle.RibbonStyle.rightStyle, _ribbonStyle.RibbonStyleWrapper.rightStyle];
var colorStyle = colorMapping[color] || _ribbonStyle.RibbonStyle.redColor;
if (positionStyle[0] === _ribbonStyle.GitHubForkRibbon.rightStyle) {
position = 'right';
}
if (positionStyle[0] === _ribbonStyle.RibbonStyle.rightStyle) {
position = 'right';
}
this.ribbonStyle = _extends({}, _ribbonStyle.GitHubForkRibbon.baseStyle, positionStyle[0], colorStyle);
var ribbonStyle = _extends({}, _ribbonStyle.RibbonStyle.baseStyle, positionStyle[0], colorStyle);
this.wrapperStyle = _extends({}, _ribbonStyle.GitHubForkRibbonWrapper.baseStyle, positionStyle[1]);
var wrapperStyle = _extends({}, _ribbonStyle.RibbonStyleWrapper.baseStyle, positionStyle[1]);
return _react2.default.createElement(
return _react2.default.createElement(
'div',
_extends({}, other, {
className: 'github-fork-ribbon-wrapper ' + position,
style: wrapperStyle }),
_react2.default.createElement(
'div',
_extends({}, other, {
className: 'github-fork-ribbon-wrapper ' + position,
style: this.wrapperStyle }),
{ className: 'github-fork-ribbon',
style: ribbonStyle },
_react2.default.createElement(
'div',
{ className: 'github-fork-ribbon',
style: this.ribbonStyle },
_react2.default.createElement(
'a',
{ href: href,
target: target,
style: _ribbonStyle.GitHubForkRibbon.urlStyle },
this.props.children
)
'a',
{ href: href,
target: target,
style: _ribbonStyle.RibbonStyle.urlStyle },
children
)
);
}
});
)
);
};
exports.default = global.RibbonStyle = GitHubForkRibbon;

@@ -12,3 +12,3 @@ 'use strict';

*/
var GitHubForkRibbon = exports.GitHubForkRibbon = {
var RibbonStyle = exports.RibbonStyle = {

@@ -129,3 +129,3 @@ baseStyle: {

var GitHubForkRibbonWrapper = exports.GitHubForkRibbonWrapper = {
var RibbonStyleWrapper = exports.RibbonStyleWrapper = {

@@ -132,0 +132,0 @@ baseStyle: {

@@ -22,55 +22,58 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

var positionMapping = {
left: [_ribbonStyle.GitHubForkRibbon.leftStyle, _ribbonStyle.GitHubForkRibbonWrapper.leftStyle],
right: [_ribbonStyle.GitHubForkRibbon.rightStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightStyle],
'left-bottom': [_ribbonStyle.GitHubForkRibbon.leftBottomStyle, _ribbonStyle.GitHubForkRibbonWrapper.leftBottomStyle],
'right-bottom': [_ribbonStyle.GitHubForkRibbon.rightBottomStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightBottomStyle]
left: [_ribbonStyle.RibbonStyle.leftStyle, _ribbonStyle.RibbonStyleWrapper.leftStyle],
right: [_ribbonStyle.RibbonStyle.rightStyle, _ribbonStyle.RibbonStyleWrapper.rightStyle],
'left-bottom': [_ribbonStyle.RibbonStyle.leftBottomStyle, _ribbonStyle.RibbonStyleWrapper.leftBottomStyle],
'right-bottom': [_ribbonStyle.RibbonStyle.rightBottomStyle, _ribbonStyle.RibbonStyleWrapper.rightBottomStyle]
};
var colorMapping = {
red: _ribbonStyle.GitHubForkRibbon.redColor,
orange: _ribbonStyle.GitHubForkRibbon.orangeColor,
black: _ribbonStyle.GitHubForkRibbon.blackColor,
green: _ribbonStyle.GitHubForkRibbon.greenColor
red: _ribbonStyle.RibbonStyle.redColor,
orange: _ribbonStyle.RibbonStyle.orangeColor,
black: _ribbonStyle.RibbonStyle.blackColor,
green: _ribbonStyle.RibbonStyle.greenColor
};
exports.default = global.GitHubForkRibbon = _react2.default.createClass({
displayName: 'GitHubForkRibbon',
render: function render() {
var _props = this.props,
_props$position = _props.position,
position = _props$position === undefined ? 'right' : _props$position,
href = _props.href,
target = _props.target,
_props$color = _props.color,
color = _props$color === undefined ? 'red' : _props$color,
other = _objectWithoutProperties(_props, ['position', 'href', 'target', 'color']);
var GitHubForkRibbon = function GitHubForkRibbon() {
var _props = undefined.props,
_props$position = _props.position,
position = _props$position === undefined ? 'right' : _props$position,
href = _props.href,
target = _props.target,
_props$color = _props.color,
color = _props$color === undefined ? 'red' : _props$color,
other = _objectWithoutProperties(_props, ['position', 'href', 'target', 'color']);
var positionStyle = positionMapping[position] || [_ribbonStyle.GitHubForkRibbon.rightStyle, _ribbonStyle.GitHubForkRibbonWrapper.rightStyle];
var colorStyle = colorMapping[color] || _ribbonStyle.GitHubForkRibbon.redColor;
var positionStyle = positionMapping[position] || [_ribbonStyle.RibbonStyle.rightStyle, _ribbonStyle.RibbonStyleWrapper.rightStyle];
var colorStyle = colorMapping[color] || _ribbonStyle.RibbonStyle.redColor;
this.ribbonStyle = _extends({}, _ribbonStyle.GitHubForkRibbon.baseStyle, positionStyle[0], colorStyle);
if (positionStyle[0] === _ribbonStyle.RibbonStyle.rightStyle) {
position = 'right';
}
this.wrapperStyle = _extends({}, _ribbonStyle.GitHubForkRibbonWrapper.baseStyle, positionStyle[1]);
undefined.ribbonStyle = _extends({}, _ribbonStyle.RibbonStyle.baseStyle, positionStyle[0], colorStyle);
return _react2.default.createElement(
undefined.wrapperStyle = _extends({}, _ribbonStyle.RibbonStyleWrapper.baseStyle, positionStyle[1]);
return _react2.default.createElement(
'div',
_extends({}, other, {
className: 'github-fork-ribbon-wrapper ' + position,
style: undefined.wrapperStyle }),
_react2.default.createElement(
'div',
_extends({}, other, {
className: 'github-fork-ribbon-wrapper ' + position,
style: this.wrapperStyle }),
{ className: 'github-fork-ribbon',
style: undefined.ribbonStyle },
_react2.default.createElement(
'div',
{ className: 'github-fork-ribbon',
style: this.ribbonStyle },
_react2.default.createElement(
'a',
{ href: href,
target: target,
style: _ribbonStyle.GitHubForkRibbon.urlStyle },
this.props.children
)
'a',
{ href: href,
target: target,
style: _ribbonStyle.RibbonStyle.urlStyle },
undefined.props.children
)
);
}
});
)
);
};
exports.default = global.RibbonStyle = GitHubForkRibbon;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

@@ -77,0 +80,0 @@ },{"./ribbonStyle":2}],2:[function(require,module,exports){

@@ -1,1 +0,1 @@

!function t(r,o,e){function i(a,b){if(!o[a]){if(!r[a]){var l="function"==typeof require&&require;if(!b&&l)return l(a,!0);if(n)return n(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var d=o[a]={exports:{}};r[a][0].call(d.exports,function(t){var o=r[a][1][t];return i(o?o:t)},d,d.exports,t,r,o,e)}return o[a].exports}for(var n="function"==typeof require&&require,a=0;a<e.length;a++)i(e[a]);return i}({1:[function(t,r,o){(function(r){"use strict";function e(t,r){var o={};for(var e in t)r.indexOf(e)>=0||Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=t[e]);return o}Object.defineProperty(o,"__esModule",{value:!0});var i=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])}return t},n=window.React,a=function(t){return t&&t.__esModule?t:{default:t}}(n),b=t("./ribbonStyle"),l={left:[b.GitHubForkRibbon.leftStyle,b.GitHubForkRibbonWrapper.leftStyle],right:[b.GitHubForkRibbon.rightStyle,b.GitHubForkRibbonWrapper.rightStyle],"left-bottom":[b.GitHubForkRibbon.leftBottomStyle,b.GitHubForkRibbonWrapper.leftBottomStyle],"right-bottom":[b.GitHubForkRibbon.rightBottomStyle,b.GitHubForkRibbonWrapper.rightBottomStyle]},f={red:b.GitHubForkRibbon.redColor,orange:b.GitHubForkRibbon.orangeColor,black:b.GitHubForkRibbon.blackColor,green:b.GitHubForkRibbon.greenColor};o.default=r.GitHubForkRibbon=a.default.createClass({displayName:"GitHubForkRibbon",render:function(){var t=this.props,r=t.position,o=void 0===r?"right":r,n=t.href,d=t.target,p=t.color,s=void 0===p?"red":p,u=e(t,["position","href","target","color"]),g=l[o]||[b.GitHubForkRibbon.rightStyle,b.GitHubForkRibbonWrapper.rightStyle],c=f[s]||b.GitHubForkRibbon.redColor;return this.ribbonStyle=i({},b.GitHubForkRibbon.baseStyle,g[0],c),this.wrapperStyle=i({},b.GitHubForkRibbonWrapper.baseStyle,g[1]),a.default.createElement("div",i({},u,{className:"github-fork-ribbon-wrapper "+o,style:this.wrapperStyle}),a.default.createElement("div",{className:"github-fork-ribbon",style:this.ribbonStyle},a.default.createElement("a",{href:n,target:d,style:b.GitHubForkRibbon.urlStyle},this.props.children)))}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ribbonStyle":2}],2:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.GitHubForkRibbon={baseStyle:{position:"absolute",padding:"2px 0",backgroundColor:"#a00",backgroundImage:"linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15))",WebkitBoxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",MozBoxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",boxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",font:'700 13px "Helvetica Neue", Helvetica, Arial, sans-serif',zIndex:"9999",pointerEvents:"auto"},urlStyle:{color:"#fff",textDecoration:"none",textShadow:"0 -1px rgba(0, 0, 0, 0.5)",textAlign:"center",width:"200px",lineHeight:"20px",display:"inline-block",padding:"2px 0",borderWidth:"1px 0",borderStyle:"dotted",borderColor:"rgba(255, 255, 255, 0.7)"},redColor:{backgroundColor:"#a00"},orangeColor:{backgroundColor:"#f80"},blackColor:{backgroundColor:"#333"},greenColor:{backgroundColor:"#090"},leftStyle:{top:"42px",left:"-43px",WebkitTransform:"rotate(-45deg)",MozTransform:"rotate(-45deg)",msTransform:"rotate(-45deg)",OTransform:"rotate(-45deg)",transform:"rotate(-45deg)"},rightStyle:{top:"42px",right:"-43px",WebkitTransform:"rotate(45deg)",MozTransform:"rotate(45deg)",msTransform:"rotate(45deg)",OTransform:"rotate(45deg)",transform:"rotate(45deg)"},leftBottomStyle:{top:"80px",left:"-43px",WebkitTransform:"rotate(45deg)",MozTransform:"rotate(45deg)",msTransform:"rotate(45deg)",OTransform:"rotate(45deg)",transform:"rotate(45deg)"},rightBottomStyle:{top:"80px",right:"-43px",WebkitTransform:"rotate(-45deg)",MozTransform:"rotate(-45deg)",msTransform:"rotate(-45deg)",OTransform:"rotate(-45deg)",transform:"rotate(-45deg)"}},o.GitHubForkRibbonWrapper={baseStyle:{width:"150px",height:"150px",position:"absolute",overflow:"hidden",top:0,zIndex:"9999",pointerEvents:"none"},fixedStyle:{position:"fixed"},leftStyle:{left:0},rightStyle:{right:0},leftBottomStyle:{position:"fixed",top:"inherit",bottom:0,left:0},rightBottomStyle:{position:"fixed",top:"inherit",bottom:0,right:0}}},{}]},{},[1]);
!function t(e,o,r){function n(l,a){if(!o[l]){if(!e[l]){var b="function"==typeof require&&require;if(!a&&b)return b(l,!0);if(i)return i(l,!0);var d=new Error("Cannot find module '"+l+"'");throw d.code="MODULE_NOT_FOUND",d}var f=o[l]={exports:{}};e[l][0].call(f.exports,function(t){var o=e[l][1][t];return n(o?o:t)},f,f.exports,t,e,o,r)}return o[l].exports}for(var i="function"==typeof require&&require,l=0;l<r.length;l++)n(r[l]);return n}({1:[function(t,e,o){(function(e){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}Object.defineProperty(o,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},i=window.React,l=function(t){return t&&t.__esModule?t:{default:t}}(i),a=t("./ribbonStyle"),b={left:[a.RibbonStyle.leftStyle,a.RibbonStyleWrapper.leftStyle],right:[a.RibbonStyle.rightStyle,a.RibbonStyleWrapper.rightStyle],"left-bottom":[a.RibbonStyle.leftBottomStyle,a.RibbonStyleWrapper.leftBottomStyle],"right-bottom":[a.RibbonStyle.rightBottomStyle,a.RibbonStyleWrapper.rightBottomStyle]},d={red:a.RibbonStyle.redColor,orange:a.RibbonStyle.orangeColor,black:a.RibbonStyle.blackColor,green:a.RibbonStyle.greenColor},f=function(){var t=(void 0).props,e=t.position,o=void 0===e?"right":e,i=t.href,f=t.target,p=t.color,g=void 0===p?"red":p,s=r(t,["position","href","target","color"]),y=b[o]||[a.RibbonStyle.rightStyle,a.RibbonStyleWrapper.rightStyle],u=d[g]||a.RibbonStyle.redColor;return y[0]===a.RibbonStyle.rightStyle&&(o="right"),(void 0).ribbonStyle=n({},a.RibbonStyle.baseStyle,y[0],u),(void 0).wrapperStyle=n({},a.RibbonStyleWrapper.baseStyle,y[1]),l.default.createElement("div",n({},s,{className:"github-fork-ribbon-wrapper "+o,style:(void 0).wrapperStyle}),l.default.createElement("div",{className:"github-fork-ribbon",style:(void 0).ribbonStyle},l.default.createElement("a",{href:i,target:f,style:a.RibbonStyle.urlStyle},(void 0).props.children)))};o.default=e.RibbonStyle=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ribbonStyle":2}],2:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.GitHubForkRibbon={baseStyle:{position:"absolute",padding:"2px 0",backgroundColor:"#a00",backgroundImage:"linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15))",WebkitBoxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",MozBoxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",boxShadow:"0 2px 3px 0 rgba(0, 0, 0, 0.5)",font:'700 13px "Helvetica Neue", Helvetica, Arial, sans-serif',zIndex:"9999",pointerEvents:"auto"},urlStyle:{color:"#fff",textDecoration:"none",textShadow:"0 -1px rgba(0, 0, 0, 0.5)",textAlign:"center",width:"200px",lineHeight:"20px",display:"inline-block",padding:"2px 0",borderWidth:"1px 0",borderStyle:"dotted",borderColor:"rgba(255, 255, 255, 0.7)"},redColor:{backgroundColor:"#a00"},orangeColor:{backgroundColor:"#f80"},blackColor:{backgroundColor:"#333"},greenColor:{backgroundColor:"#090"},leftStyle:{top:"42px",left:"-43px",WebkitTransform:"rotate(-45deg)",MozTransform:"rotate(-45deg)",msTransform:"rotate(-45deg)",OTransform:"rotate(-45deg)",transform:"rotate(-45deg)"},rightStyle:{top:"42px",right:"-43px",WebkitTransform:"rotate(45deg)",MozTransform:"rotate(45deg)",msTransform:"rotate(45deg)",OTransform:"rotate(45deg)",transform:"rotate(45deg)"},leftBottomStyle:{top:"80px",left:"-43px",WebkitTransform:"rotate(45deg)",MozTransform:"rotate(45deg)",msTransform:"rotate(45deg)",OTransform:"rotate(45deg)",transform:"rotate(45deg)"},rightBottomStyle:{top:"80px",right:"-43px",WebkitTransform:"rotate(-45deg)",MozTransform:"rotate(-45deg)",msTransform:"rotate(-45deg)",OTransform:"rotate(-45deg)",transform:"rotate(-45deg)"}},o.GitHubForkRibbonWrapper={baseStyle:{width:"150px",height:"150px",position:"absolute",overflow:"hidden",top:0,zIndex:"9999",pointerEvents:"none"},fixedStyle:{position:"fixed"},leftStyle:{left:0},rightStyle:{right:0},leftBottomStyle:{position:"fixed",top:"inherit",bottom:0,left:0},rightBottomStyle:{position:"fixed",top:"inherit",bottom:0,right:0}}},{}]},{},[1]);
{
"name": "react-github-fork-ribbon",
"description": "Pure inline style github fork ribbon on React component",
"version": "0.4.5",
"version": "0.5.0",
"keywords": [

@@ -32,3 +32,4 @@ "fork",

"prepublish": "gulp transpile",
"storybook": "start-storybook -p 8000 -c storybook"
"storybook": "start-storybook -p 8000 -c storybook",
"test": "jest --coverage"
},

@@ -40,3 +41,3 @@ "engines": {

"peerDependencies": {
"react": "^0.13.0 || ^0.14.0 || ^15.0.0-0"
"react": "^0.14.0 || ^15.0.0"
},

@@ -46,10 +47,11 @@ "devDependencies": {

"babel": "^6.5.2",
"babel-core": "^6.7.6",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-3": "^6.22.0",
"babel-core": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"babelify": "^7.2.0",
"browserify": "^14.1.0",
"browserify": "^14.3.0",
"browserify-global-shim": "^1.0.3",
"enzyme": "^2.7.1",
"enzyme": "^2.8.0",
"enzyme-to-json": "^1.5.0",
"expect": "^1.20.2",

@@ -59,7 +61,8 @@ "gulp": "git://github.com/gulpjs/gulp.git#4.0",

"gulp-rename": "^1.2.2",
"gulp-uglify": "^2.1.0",
"gulp-uglify": "^2.1.2",
"gulp-util": "^3.0.6",
"react-addons-test-utils": "^15.4.2",
"identity-obj-proxy": "^3.0.0",
"jest": "^19.0.2",
"react-addons-test-utils": "^15.5.1",
"react-hot-loader": "3.0.0-beta.6",
"react-test-renderer": "^15.4.2",
"storybook-addon-specifications": "^1.0.16",

@@ -69,3 +72,33 @@ "vinyl-buffer": "^1.0.0",

},
"dependencies": {}
"dependencies": {},
"jest": {
"setupFiles": [
"<rootDir>/storybook/__conf__/mockConfig.js"
],
"testMatch": [
"**/storybook/**/*.stories.js",
"**/src/**/*.spec.js"
],
"automock": false,
"globals": {
"__TESTS__": true
},
"unmockedModulePathPatterns": [
"<rootDir>/node_modules/react/",
"<rootDir>/node_modules/react-dom/",
"<rootDir>/node_modules/enzyme/",
"<rootDir>/node_modules/react-addons-test-utils/"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/storybook/__mocks__/file.js",
"\\.(css|less)$": "identity-obj-proxy"
},
"coveragePathIgnorePatterns": [
"<rootDir>/storybook/",
"<rootDir>/node_modules/"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
}
}

@@ -7,5 +7,5 @@ React GitHub Fork Ribbon

| | React = 0.12 | React >= 0.13 |
| ------- | ------------ | ------------- |
| Version | <= 0.2 | >= 0.3 |
| | React = 0.12 | React = 0.13 | React >= 0.14 |
| ------- | ------------ | ------------- | ------------- |
| Version | <= 0.2 | >= 0.3 < 0.5 | >= 0.5 |

@@ -18,21 +18,16 @@ ## Usage

Ex. React 0.14
Ex. React 15.5
```js
var React = require('react');
var ReactDOM = require('react-dom');
var GitHubForkRibbon = require('react-github-fork-ribbon');
import React from 'react';
import ReactDOM from 'react-dom';
import GitHubForkRibbon from 'react-github-fork-ribbon';
var Content = React.createClass({
const Content = () => (
<GitHubForkRibbon href="//www.google.com"
target="_blank"
position="right">
Fork me on GitHub
</GitHubForkRibbon>
);
render: function () {
return (
<GitHubForkRibbon href="//www.google.com"
target="_blank"
position="right">
Fork me on GitHub
</GitHubForkRibbon>
);
}
});
ReactDOM.render(

@@ -44,26 +39,2 @@ <Content />,

Ex. React 0.13
```js
var React = require('react');
var GitHubForkRibbon = require('react-github-fork-ribbon');
var Content = React.createClass({
render: function () {
return (
<GitHubForkRibbon href="//www.google.com"
target="_blank"
position="right">
Fork me on GitHub
</GitHubForkRibbon>
);
}
});
React.render(
<Content />,
document.getElementById('content')
);
```
## Attribute

@@ -97,2 +68,8 @@

### Version 0.5.0 - 2017/04/11
- Drop react 0.13 support
- Support react 15.5 for preparing upgrade to react 16
- Add jest for snapshot testing
### Version 0.4.5 - 2017/03/11

@@ -155,3 +132,3 @@

Copyright (c) 2015 Lee < jessy1092@gmail.com >
Copyright (c) 2015-2017 Lee < jessy1092@gmail.com >

@@ -158,0 +135,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc