anchor-ui
Advanced tools
Comparing version 1.8.4 to 1.8.5
@@ -84,3 +84,4 @@ 'use strict'; | ||
var _props = this.props, | ||
content = _props.content, | ||
value = _props.value, | ||
maxValue = _props.maxValue, | ||
inverted = _props.inverted; | ||
@@ -93,2 +94,8 @@ var _state = this.state, | ||
var content = value; | ||
if (value > maxValue) { | ||
content = maxValue + '+'; | ||
} | ||
return _react2.default.createElement( | ||
@@ -108,3 +115,3 @@ 'span', | ||
Badge.propTypes = { | ||
content: _react.PropTypes.node.isRequired, | ||
value: _react.PropTypes.number.isRequired, | ||
sheet: _react.PropTypes.shape({ | ||
@@ -116,3 +123,4 @@ classes: _react.PropTypes.shape({ | ||
style: _react.PropTypes.instanceOf(Object), | ||
inverted: _react.PropTypes.bool | ||
inverted: _react.PropTypes.bool, | ||
maxValue: _react.PropTypes.number.isRequired | ||
}; | ||
@@ -119,0 +127,0 @@ Badge.defaultProps = { |
{ | ||
"name": "anchor-ui", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "React Component UI Kit", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -77,6 +77,7 @@ # Anchor UI | ||
| Name | Type | Required | Default | Description | | ||
|:--------|:-------|:---------|:--------|:----------------------------------------| | ||
| content | Node | Yes | | Content to be rendered | | ||
| style | Object | No | {} | Override the styles of the root element | | ||
| Name | Type | Required | Default | Description | | ||
|:---------|:-------|:---------|:--------|:-----------------------------------------------------------------------------| | ||
| value | Number | Yes | | Content to be rendered | | ||
| maxValue | Number | Yes | | The badge's max value, will display `${maxValue}+` if this value is exceeded | | ||
| style | Object | No | {} | Override the styles of the root element | | ||
@@ -83,0 +84,0 @@ --- |
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
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
213995
3556
285