New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

accessible-react-tabs

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accessible-react-tabs - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

4

es/Tab.js

@@ -21,2 +21,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

};
if (_this.props.index === _this.props.selectedIndex && _this.props.callback) {
_this.props.callback();
}
return _this;

@@ -23,0 +27,0 @@ }

20

es/Tabs.js

@@ -42,15 +42,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

if (this.state.selected === index) {
if (this.props.callback) {
this.props.callback;
}
return;
}
if (this.props.callback) {
this.props.callback;
}
this.setState({
selected: index
});
if (this.props.data[index].callback) {
this.props.data[index].callback();
}
};

@@ -75,9 +72,9 @@

if (this.props.callback) {
this.props.callback;
}
this.setState({
selected: targetIndex
});
if (this.props.callback) {
this.props.callback();
}
};

@@ -105,2 +102,3 @@

var label = tab.label;
var cb = tab.callback;
return React.createElement(Tab, { key: index, index: index, selectedIndex: _this2.state.selected, label: label, onClick: _this2.handleClick, onKeyDown: _this2.handleKeyDown });

@@ -107,0 +105,0 @@ })

@@ -29,2 +29,6 @@ "use strict";

};
if (_this.props.index === _this.props.selectedIndex && _this.props.callback) {
_this.props.callback();
}
return _this;

@@ -31,0 +35,0 @@ }

@@ -57,15 +57,12 @@ 'use strict';

if (this.state.selected === index) {
if (this.props.callback) {
this.props.callback;
}
return;
}
if (this.props.callback) {
this.props.callback;
}
this.setState({
selected: index
});
if (this.props.data[index].callback) {
this.props.data[index].callback();
}
};

@@ -90,9 +87,9 @@

if (this.props.callback) {
this.props.callback;
}
this.setState({
selected: targetIndex
});
if (this.props.callback) {
this.props.callback();
}
};

@@ -120,2 +117,3 @@

var label = tab.label;
var cb = tab.callback;
return _react2.default.createElement(_Tab2.default, { key: index, index: index, selectedIndex: _this2.state.selected, label: label, onClick: _this2.handleClick, onKeyDown: _this2.handleKeyDown });

@@ -122,0 +120,0 @@ })

{
"name": "accessible-react-tabs",
"version": "0.0.8",
"version": "0.0.9",
"description": "Accessible tab component for React",

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

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