36 lines
905 B
JavaScript
36 lines
905 B
JavaScript
'use client';
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "useRatingDisplayContextValues", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return useRatingDisplayContextValues;
|
|
}
|
|
});
|
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
const useRatingDisplayContextValues = (state)=>{
|
|
const { color, compact, icon, size, value } = state;
|
|
const ratingItem = _react.useMemo(()=>({
|
|
color,
|
|
compact,
|
|
iconFilled: icon,
|
|
iconOutline: icon,
|
|
interactive: false,
|
|
step: 0.5,
|
|
size,
|
|
value
|
|
}), [
|
|
color,
|
|
compact,
|
|
icon,
|
|
size,
|
|
value
|
|
]);
|
|
return {
|
|
ratingItem
|
|
};
|
|
};
|