Socket
Socket
Sign inDemoInstall

rc-rate

Package Overview
Dependencies
0
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

8

lib/Rate.js

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

propTypes: {
disabled: _react.PropTypes.bool,
value: _react.PropTypes.number,

@@ -110,2 +111,3 @@ defaultValue: _react.PropTypes.number,

var prefixCls = _props.prefixCls;
var disabled = _props.disabled;
var _state = this.state;

@@ -116,2 +118,3 @@ var value = _state.value;

var stars = [];
var disabledClass = disabled ? prefixCls + '-disabled' : '';
for (var index = 0; index < count; index++) {

@@ -121,2 +124,3 @@ stars.push(_react2.default.createElement(_Star2.default, {

index: index,
disabled: disabled,
prefixCls: prefixCls + '-star',

@@ -133,5 +137,5 @@ allowHalf: allowHalf,

{
className: '' + prefixCls,
className: prefixCls + ' ' + disabledClass,
style: style,
onMouseLeave: this.onMouseLeave
onMouseLeave: disabled ? null : this.onMouseLeave
},

@@ -138,0 +142,0 @@ stars

@@ -21,2 +21,3 @@ 'use strict';

allowHalf: _react.PropTypes.bool,
disabled: _react.PropTypes.bool,
onHover: _react.PropTypes.func,

@@ -48,7 +49,8 @@ onClick: _react.PropTypes.func

var onClick = this.onClick;
var disabled = this.props.disabled;
return _react2.default.createElement('li', {
className: this.getClassName(),
onClick: onClick,
onMouseMove: onHover
onClick: disabled ? null : onClick,
onMouseMove: disabled ? null : onHover
});

@@ -55,0 +57,0 @@ }

{
"name": "rc-rate",
"version": "1.0.0",
"version": "1.0.1",
"description": "React Star Rate Component",

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

@@ -82,2 +82,3 @@ # rc-rate

<td>number</td>
<td></td>
<td>controlled value</td>

@@ -101,2 +102,3 @@ </tr>

<td>{}</td>
<td></td>
</tr>

@@ -106,2 +108,3 @@ <tr>

<td>function(value: Number)</td>
<td></td>
<td>`onChange` will be triggered when click.</td>

@@ -108,0 +111,0 @@ </tr>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc