Comparing version 7.1.1 to 7.2.0
@@ -21,2 +21,4 @@ 'use strict'; | ||
exports.getMarginStyle = getMarginStyle; | ||
exports.getStyle = getStyle; | ||
exports.setPxStyle = setPxStyle; | ||
@@ -90,2 +92,10 @@ var _react = require('react'); | ||
return (0, _defineProperty3["default"])({}, marginDirection, -index * 100 + '%'); | ||
} | ||
function getStyle(el, property) { | ||
return +getComputedStyle(el).getPropertyValue(property).replace('px', ''); | ||
} | ||
function setPxStyle(el, property, value) { | ||
el.style[property] = value + 'px'; | ||
} |
{ | ||
"name": "rc-tabs", | ||
"version": "7.1.1", | ||
"version": "7.2.0", | ||
"description": "tabs ui component for react", | ||
@@ -34,12 +34,23 @@ "keywords": [ | ||
"lint": "rc-tools run lint", | ||
"watch": "rc-tools run watch", | ||
"karma": "rc-tools run karma", | ||
"saucelabs": "rc-tools run saucelabs", | ||
"test": "rc-tools run test", | ||
"test": "jest", | ||
"updateSn": "jest --updateSnapshot", | ||
"chrome-test": "rc-tools run chrome-test", | ||
"coverage": "rc-tools run coverage" | ||
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls" | ||
}, | ||
"jest": { | ||
"collectCoverageFrom": [ | ||
"src/*" | ||
] | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.11.16", | ||
"enzyme": "^2.7.1", | ||
"enzyme-to-json": "^1.5.0", | ||
"expect.js": "~0.3.1", | ||
"fastclick": "~1.0.6", | ||
"history": "^1.17.0", | ||
"jest": "^19.0.2", | ||
"pre-commit": "1.x", | ||
@@ -46,0 +57,0 @@ "rc-tools": "5.x", |
@@ -72,3 +72,3 @@ # rc-tabs | ||
## API | ||
## API | ||
@@ -131,2 +131,8 @@ ### Tabs | ||
</tr> | ||
<tr> | ||
<td>prefixCls</td> | ||
<td>String</td> | ||
<th>rc-tabs</th> | ||
<td>prefix class name, use to custom style</td> | ||
</tr> | ||
</tbody> | ||
@@ -236,2 +242,37 @@ </table> | ||
### lib/SwipeableInkTabBar (Use for Mobile) | ||
swipeable tab bar with ink indicator, same with tab bar/ink bar props, and below is the additional props. | ||
<table class="table table-bordered table-striped"> | ||
<thead> | ||
<tr> | ||
<th style="width: 100px;">name</th> | ||
<th style="width: 50px;">type</th> | ||
<th>default</th> | ||
<th>description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>pageSize</td> | ||
<td>number</td> | ||
<th>5</th> | ||
<td>show how many tabs at one page</td> | ||
</tr> | ||
<tr> | ||
<td>speed</td> | ||
<td>number</td> | ||
<th>5</th> | ||
<td>swipe speed, 1 to 10, more bigger more faster</td> | ||
</tr> | ||
<tr> | ||
<td>hammerOptions</td> | ||
<td>Object</td> | ||
<td></td> | ||
<td>options for react-hammerjs</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
### lib/TabContent | ||
@@ -251,4 +292,4 @@ | ||
<td>style</td> | ||
<td>{}</td> | ||
<th></th> | ||
<td>Object</td> | ||
<td></td> | ||
<td>tab content style</td> | ||
@@ -258,4 +299,4 @@ </tr> | ||
<td>animated</td> | ||
<td>Boolean</td> | ||
<td>true</td> | ||
<th></th> | ||
<td>whether tabpane change with animation</td> | ||
@@ -265,6 +306,12 @@ </tr> | ||
<td>animatedWithMargin</td> | ||
<td>Boolean</td> | ||
<td>false</td> | ||
<th></th> | ||
<td>whether animate tabpane with css margin</td> | ||
</tr> | ||
<tr> | ||
<td>forceRender</td> | ||
<td>Boolean</td> | ||
<td>false</td> | ||
<td>forced render of content in tabs, not lazy render after clicking on tabs</td> | ||
</tr> | ||
</tbody> | ||
@@ -289,4 +336,4 @@ </table> | ||
<td>hammerOptions</td> | ||
<td>{}</td> | ||
<th></th> | ||
<td>Object</td> | ||
<td></td> | ||
<td>options for react-hammerjs</td> | ||
@@ -293,0 +340,0 @@ </tr> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73132
21
1890
371
13
1