rc-tabs
Advanced tools
Comparing version 12.13.1 to 12.14.0
@@ -18,3 +18,3 @@ import * as React from 'react'; | ||
} | ||
declare function TabNode({ prefixCls, id, active, tab: { key, label, disabled, closeIcon }, closable, renderWrapper, removeAriaLabel, editable, onClick, onFocus, style, }: TabNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>; | ||
declare function TabNode({ prefixCls, id, active, tab: { key, label, disabled, closeIcon, icon }, closable, renderWrapper, removeAriaLabel, editable, onClick, onFocus, style, }: TabNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>; | ||
export default TabNode; |
@@ -16,2 +16,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
closeIcon = _ref$tab.closeIcon, | ||
icon = _ref$tab.icon, | ||
closable = _ref.closable, | ||
@@ -67,3 +68,5 @@ renderWrapper = _ref.renderWrapper, | ||
onFocus: onFocus | ||
}, label), removable && /*#__PURE__*/React.createElement("button", { | ||
}, icon && /*#__PURE__*/React.createElement("span", { | ||
className: "".concat(tabPrefix, "-icon") | ||
}, icon), label), removable && /*#__PURE__*/React.createElement("button", { | ||
type: "button", | ||
@@ -70,0 +73,0 @@ "aria-label": removeAriaLabel || 'remove', |
@@ -11,2 +11,3 @@ import * as React from 'react'; | ||
closeIcon?: React.ReactNode; | ||
icon?: React.ReactNode; | ||
prefixCls?: string; | ||
@@ -13,0 +14,0 @@ tabKey?: string; |
@@ -0,3 +1,3 @@ | ||
import classNames from 'classnames'; | ||
import * as React from 'react'; | ||
import classNames from 'classnames'; | ||
var TabPane = /*#__PURE__*/React.forwardRef(function (_ref, ref) { | ||
@@ -4,0 +4,0 @@ var prefixCls = _ref.prefixCls, |
@@ -18,3 +18,3 @@ import * as React from 'react'; | ||
} | ||
declare function TabNode({ prefixCls, id, active, tab: { key, label, disabled, closeIcon }, closable, renderWrapper, removeAriaLabel, editable, onClick, onFocus, style, }: TabNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>; | ||
declare function TabNode({ prefixCls, id, active, tab: { key, label, disabled, closeIcon, icon }, closable, renderWrapper, removeAriaLabel, editable, onClick, onFocus, style, }: TabNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>; | ||
export default TabNode; |
@@ -26,2 +26,3 @@ "use strict"; | ||
closeIcon = _ref$tab.closeIcon, | ||
icon = _ref$tab.icon, | ||
closable = _ref.closable, | ||
@@ -77,3 +78,5 @@ renderWrapper = _ref.renderWrapper, | ||
onFocus: onFocus | ||
}, label), removable && /*#__PURE__*/React.createElement("button", { | ||
}, icon && /*#__PURE__*/React.createElement("span", { | ||
className: "".concat(tabPrefix, "-icon") | ||
}, icon), label), removable && /*#__PURE__*/React.createElement("button", { | ||
type: "button", | ||
@@ -80,0 +83,0 @@ "aria-label": removeAriaLabel || 'remove', |
@@ -11,2 +11,3 @@ import * as React from 'react'; | ||
closeIcon?: React.ReactNode; | ||
icon?: React.ReactNode; | ||
prefixCls?: string; | ||
@@ -13,0 +14,0 @@ tabKey?: string; |
@@ -9,4 +9,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -13,0 +13,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
{ | ||
"name": "rc-tabs", | ||
"version": "12.13.1", | ||
"version": "12.14.0", | ||
"description": "tabs ui component for react", | ||
@@ -49,6 +49,6 @@ "engines": { | ||
"@types/enzyme": "^3.10.5", | ||
"@types/jest": "^25.2.3", | ||
"@types/keyv": "3.1.4", | ||
"@types/jest": "^29.4.0", | ||
"@types/keyv": "4.2.0", | ||
"@types/react": "^17.0.14", | ||
"@types/react-dom": "^16.9.8", | ||
"@types/react-dom": "^18.0.11", | ||
"@umijs/fabric": "^2.3.1", | ||
@@ -61,6 +61,6 @@ "coveralls": "^3.0.6", | ||
"father": "^4.0.0", | ||
"gh-pages": "^3.1.0", | ||
"history": "^1.17.0", | ||
"gh-pages": "^5.0.0", | ||
"history": "^5.3.0", | ||
"immutability-helper": "^3.0.1", | ||
"less": "^3.11.1", | ||
"less": "^4.1.3", | ||
"np": "^7.5.0", | ||
@@ -67,0 +67,0 @@ "preact-compat": "^3.16.0", |
@@ -80,3 +80,3 @@ # rc-tabs | ||
| tabBarGutter | number | 0 | config tab bar gutter | | ||
| tabBarPosition | `'left' | 'right' | 'top' | 'bottom'` | `'top'` | tab nav 's position | | ||
| tabBarPosition | `'left' \| 'right' \| 'top' \| 'bottom'` | `'top'` | tab nav 's position | | ||
| tabBarStyle | style | - | tab nav style | | ||
@@ -128,5 +128,5 @@ | tabBarExtraContent | ReactNode \| `{ left: ReactNode, right: ReactNode }` | - | config extra content | | ||
### Resposive Tabs | ||
### Responsive Tabs | ||
There are 3 cases when handling resposive tabs: | ||
There are 3 cases when handling responsive tabs: | ||
![image](https://user-images.githubusercontent.com/27722486/156315099-7e6eda9d-ab77-4b16-9b49-1727c5ec8b26.png) | ||
@@ -133,0 +133,0 @@ |
164160
3915