Comparing version 2.7.0 to 2.8.0
@@ -16,3 +16,5 @@ import React from 'react'; | ||
className?: string; | ||
character?: React.ReactNode; | ||
character?: ({ index: number }: { | ||
index: any; | ||
}) => React.ReactNode | React.ReactNode; | ||
characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; | ||
@@ -19,0 +21,0 @@ tabIndex?: number; |
@@ -10,3 +10,5 @@ import React from 'react'; | ||
onClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>, index: number) => void; | ||
character?: React.ReactNode; | ||
character?: ({ index: number }: { | ||
index: any; | ||
}) => React.ReactNode | React.ReactNode; | ||
characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; | ||
@@ -13,0 +15,0 @@ focused?: boolean; |
@@ -96,2 +96,5 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
value = _this$props5.value; | ||
var characterNode = typeof character === 'function' ? character({ | ||
index: index | ||
}) : character; | ||
var start = React.createElement("li", { | ||
@@ -110,5 +113,5 @@ className: this.getClassName() | ||
className: "".concat(prefixCls, "-first") | ||
}, character), React.createElement("div", { | ||
}, characterNode), React.createElement("div", { | ||
className: "".concat(prefixCls, "-second") | ||
}, character))); | ||
}, characterNode))); | ||
@@ -115,0 +118,0 @@ if (characterRender) { |
@@ -16,3 +16,5 @@ import React from 'react'; | ||
className?: string; | ||
character?: React.ReactNode; | ||
character?: ({ index: number }: { | ||
index: any; | ||
}) => React.ReactNode | React.ReactNode; | ||
characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; | ||
@@ -19,0 +21,0 @@ tabIndex?: number; |
@@ -10,3 +10,5 @@ import React from 'react'; | ||
onClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>, index: number) => void; | ||
character?: React.ReactNode; | ||
character?: ({ index: number }: { | ||
index: any; | ||
}) => React.ReactNode | React.ReactNode; | ||
characterRender?: (origin: React.ReactElement, props: StarProps) => React.ReactNode; | ||
@@ -13,0 +15,0 @@ focused?: boolean; |
@@ -108,2 +108,5 @@ "use strict"; | ||
value = _this$props5.value; | ||
var characterNode = typeof character === 'function' ? character({ | ||
index: index | ||
}) : character; | ||
@@ -123,5 +126,5 @@ var start = _react.default.createElement("li", { | ||
className: "".concat(prefixCls, "-first") | ||
}, character), _react.default.createElement("div", { | ||
}, characterNode), _react.default.createElement("div", { | ||
className: "".concat(prefixCls, "-second") | ||
}, character))); | ||
}, characterNode))); | ||
@@ -128,0 +131,0 @@ if (characterRender) { |
{ | ||
"name": "rc-rate", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "React Star Rate Component", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -147,3 +147,3 @@ # rc-rate | ||
<td>character</td> | ||
<td>ReactNode</td> | ||
<td>ReactNode | ({index}) => ReactNode</td> | ||
<td>ā </td> | ||
@@ -150,0 +150,0 @@ <td>The each character of rate</td> |
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
48082
1160