react-slot-counter
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -19,2 +19,3 @@ import React from 'react'; | ||
dummyCharacterCount?: number; | ||
direction?: 'bottom-up' | 'top-down'; | ||
}) => void; | ||
@@ -21,0 +22,0 @@ } |
@@ -284,2 +284,3 @@ import React, { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback, useImperativeHandle } from 'react'; | ||
}, valueList.map(function (v, i) { | ||
var _a; | ||
var isChanged = isChangedValueIndexList.includes(i); | ||
@@ -289,3 +290,4 @@ var delay = (isChanged ? isChangedValueIndexList.indexOf(i) : 0) * calculatedInterval; | ||
var prevValue = prevValueRef.current; | ||
var reverseAnimation = value != null && prevValue != null && isNumeric(value) ? toNumeric(value) < toNumeric(prevValue) : false; | ||
var isDecrease = value != null && prevValue != null && isNumeric(value); | ||
var reverseAnimation = ((_a = startAnimationOptionsRef.current) === null || _a === void 0 ? void 0 : _a.direction) === 'top-down' || (isDecrease ? toNumeric(value) < toNumeric(prevValue) : false); | ||
if (SEPARATOR.includes(v)) { | ||
@@ -292,0 +294,0 @@ return React.createElement("div", { |
@@ -286,2 +286,3 @@ 'use strict'; | ||
}, valueList.map(function (v, i) { | ||
var _a; | ||
var isChanged = isChangedValueIndexList.includes(i); | ||
@@ -291,3 +292,4 @@ var delay = (isChanged ? isChangedValueIndexList.indexOf(i) : 0) * calculatedInterval; | ||
var prevValue = prevValueRef.current; | ||
var reverseAnimation = value != null && prevValue != null && isNumeric(value) ? toNumeric(value) < toNumeric(prevValue) : false; | ||
var isDecrease = value != null && prevValue != null && isNumeric(value); | ||
var reverseAnimation = ((_a = startAnimationOptionsRef.current) === null || _a === void 0 ? void 0 : _a.direction) === 'top-down' || (isDecrease ? toNumeric(value) < toNumeric(prevValue) : false); | ||
if (SEPARATOR.includes(v)) { | ||
@@ -294,0 +296,0 @@ return React.createElement("div", { |
{ | ||
"name": "react-slot-counter", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "A versatile and engaging component to display numbers in a captivating slot machine UI, perfect for enhancing user experience and grabbing attention in your web projects", | ||
@@ -5,0 +5,0 @@ "author": "almond-bongbong", |
@@ -90,2 +90,3 @@ # react-slot-counter | ||
- `dummyCharacterCount`: The number of dummy characters to be displayed in the animation before reaching the target character. Overrides the `dummyCharacterCount` prop. | ||
- `direction`: This option determines the direction of the slot machine animation. The accepted values are `bottom-top` and `top-bottom`. The default value is `bottom-top`. If `bottom-top` is chosen, the animation will start from the bottom and move towards the top. If `top-bottom` is chosen, the animation will start from the top and move downwards. | ||
@@ -92,0 +93,0 @@ Example: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
39038
658
131