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

rc-tabs

Package Overview
Dependencies
Maintainers
1
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tabs - npm Package Compare versions

Comparing version 8.1.1 to 9.0.0

29

es/TabBarMixin.js
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _extends from 'babel-runtime/helpers/extends';
import React from 'react';
import React, { cloneElement } from 'react';
import classnames from 'classnames';
import warning from 'warning';
var tabBarExtraContentStyle = {
float: 'right'
};
export default {

@@ -66,4 +62,2 @@ getDefaultProps: function getDefaultProps() {

getRootNode: function getRootNode(contents) {
var _classnames;
var _props = this.props,

@@ -74,5 +68,12 @@ prefixCls = _props.prefixCls,

extraContent = _props.extraContent,
style = _props.style;
style = _props.style,
tabBarPosition = _props.tabBarPosition;
var cls = classnames((_classnames = {}, _defineProperty(_classnames, prefixCls + '-bar', 1), _defineProperty(_classnames, className, !!className), _classnames));
var cls = classnames(prefixCls + '-bar', _defineProperty({}, className, !!className));
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {};
var children = [cloneElement(extraContent, {
key: 'extra',
style: _extends({}, tabBarExtraContentStyle, extraContent.props.style)
}), cloneElement(contents, { key: 'content' })];
return React.createElement(

@@ -88,13 +89,5 @@ 'div',

},
extraContent ? React.createElement(
'div',
{
style: tabBarExtraContentStyle,
key: 'extra'
},
extraContent
) : null,
contents
topOrBottom ? children : children.reverse()
);
}
};
# History
----
## 9.0.0 / 2017-08-04
* Refactor extraContent dom structure.
## 7.1.0 / 2016-12-06

@@ -54,2 +58,2 @@

`improved` [#4](https://github.com/react-component/tabs/issues/4) lazy render on initial render and update
`improved` [#4](https://github.com/react-component/tabs/issues/4) lazy render on initial render and update

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

var tabBarExtraContentStyle = {
float: 'right'
};
exports['default'] = {

@@ -89,4 +85,2 @@ getDefaultProps: function getDefaultProps() {

getRootNode: function getRootNode(contents) {
var _classnames;
var _props = this.props,

@@ -97,5 +91,12 @@ prefixCls = _props.prefixCls,

extraContent = _props.extraContent,
style = _props.style;
style = _props.style,
tabBarPosition = _props.tabBarPosition;
var cls = (0, _classnames3['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-bar', 1), (0, _defineProperty3['default'])(_classnames, className, !!className), _classnames));
var cls = (0, _classnames3['default'])(prefixCls + '-bar', (0, _defineProperty3['default'])({}, className, !!className));
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {};
var children = [(0, _react.cloneElement)(extraContent, {
key: 'extra',
style: (0, _extends3['default'])({}, tabBarExtraContentStyle, extraContent.props.style)
}), (0, _react.cloneElement)(contents, { key: 'content' })];
return _react2['default'].createElement(

@@ -111,11 +112,3 @@ 'div',

},
extraContent ? _react2['default'].createElement(
'div',
{
style: tabBarExtraContentStyle,
key: 'extra'
},
extraContent
) : null,
contents
topOrBottom ? children : children.reverse()
);

@@ -122,0 +115,0 @@ }

{
"name": "rc-tabs",
"version": "8.1.1",
"version": "9.0.0",
"description": "tabs ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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