Skip to content

Commit

Permalink
feat(plasma-new-hope): update value display logic for Rating
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanKuzmich committed Dec 27, 2024
1 parent da1e6dd commit d2ae0d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plasma-new-hope/src/components/Rating/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const getHelperTextPlacement = (
export const getInnerValue = (value?: number | null, precision?: number, iconQuantity = 5) => {
let innerValue = value ? String(value) : '';

if (value && value > valueConstraints.max) {
innerValue = iconQuantity === 1 ? String(valueConstraints.max) : String(iconQuantity);
if (value && value > iconQuantity) {
innerValue = iconQuantity === 1 ? String(value) : String(iconQuantity);
}

if (value && value < valueConstraints.min) {
Expand Down

0 comments on commit d2ae0d6

Please sign in to comment.