@arquimedes.co/eureka-forms 2.0.93 → 2.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function ScaleRating({ value,
|
|
3
|
+
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
|
|
4
4
|
export default ScaleRating;
|
|
@@ -41,7 +41,7 @@ var useRatingStyles = function (props) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
function ScaleRating(_a) {
|
|
44
|
-
var value = _a.value,
|
|
44
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
45
45
|
var ratingClasses = useRatingStyles({
|
|
46
46
|
unSelectedColor: unSelectedColor,
|
|
47
47
|
focusColor: focusColor,
|
|
@@ -49,7 +49,7 @@ function ScaleRating(_a) {
|
|
|
49
49
|
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
|
|
50
50
|
if (!disabled)
|
|
51
51
|
onChange(newValue);
|
|
52
|
-
}, disabled: disabled, classes: ratingClasses,
|
|
52
|
+
}, disabled: disabled, classes: ratingClasses, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
|
|
53
53
|
}
|
|
54
54
|
function IconContainer(_a) {
|
|
55
55
|
var value = _a.value, other = __rest(_a, ["value"]);
|