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

react-facebook

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-facebook - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

18

__tests__/input.jsx
import React from 'react';
import { mount } from 'enzyme';
import FacebookProvider from '../src';
import FacebookProvider, { Share } from '../src';

@@ -15,2 +15,18 @@ describe('Provider', () => {

});
it('should be able to create simple instance', (done) => {
const wrapper = mount(
<FacebookProvider appID="123456789">
<Share>
<button type="button" onClick={done}>
Test
</button>
</Share>
</FacebookProvider>
);
expect(wrapper.html()).toBe('<button type="button">Test</button>');
wrapper.find('button').first().simulate('click');
});
});

12

dist/Share.js

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

Share.prototype.handleClick = function handleClick(evn) {
Share.prototype.onClick = function onClick(evn) {
evn.preventDefault();

@@ -121,2 +121,8 @@ evn.stopPropagation();

window.open(href, 'sharer', params);
var children = this.props.children;
if (children && children.props && children.props.onClick) {
children.props.onClick(evn);
}
};

@@ -128,3 +134,3 @@

return _react2.default.cloneElement(children, { onClick: this.handleClick });
return _react2.default.cloneElement(children, { onClick: this.onClick });
};

@@ -151,3 +157,3 @@

icon: true
}, _temp), (_applyDecoratedDescriptor(_class.prototype, 'handleClick', [_coreDecorators.autobind], Object.getOwnPropertyDescriptor(_class.prototype, 'handleClick'), _class.prototype)), _class);
}, _temp), (_applyDecoratedDescriptor(_class.prototype, 'onClick', [_coreDecorators.autobind], Object.getOwnPropertyDescriptor(_class.prototype, 'onClick'), _class.prototype)), _class);
exports.default = Share;
{
"name": "react-facebook",
"version": "2.2.4",
"version": "2.2.5",
"description": "Facebook components like a Login button, Like, Share, Comments or Embedded Post",

@@ -5,0 +5,0 @@ "author": {

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