react-light-marquee
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -6,3 +6,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
direction?: MarqueeDirection; | ||
speed?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; | ||
speed?: number; | ||
pauseOnHover?: boolean; | ||
@@ -9,0 +9,0 @@ initialSlideIndex?: number; |
@@ -121,3 +121,3 @@ // src/Marquee/index.tsx | ||
var Marquee = ({ | ||
speed = 5, | ||
speed = 50, | ||
children = [], | ||
@@ -167,3 +167,2 @@ direction = "left", | ||
const translateProp = getTranslateProp(direction); | ||
const pxPerSec = speed * 10; | ||
const { slideEdges, finalSlides, contentSize } = handleReplication( | ||
@@ -174,6 +173,6 @@ wrapper, | ||
); | ||
const totalAnimationDuration = contentSize / pxPerSec * 1e3 | 0; | ||
const totalAnimationDuration = contentSize / speed * 1e3 | 0; | ||
setSlides(finalSlides); | ||
slideEdges.forEach((slideEndingEdge, index) => { | ||
const firstAnimationDuration = slideEndingEdge / pxPerSec * 1e3 | 0; | ||
const firstAnimationDuration = slideEndingEdge / speed * 1e3 | 0; | ||
const animationConfigs = [ | ||
@@ -180,0 +179,0 @@ { |
{ | ||
"name": "react-light-marquee", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -21,3 +21,3 @@ # react-light-marquee | ||
import Marquee from "react-light-marquee"; | ||
const Page = () => ( | ||
@@ -31,3 +31,3 @@ <Marquee direction="right"> | ||
); | ||
export default Page; | ||
@@ -40,3 +40,3 @@ | ||
|:--|:--|:--|:--| | ||
| direction | `"left" | "right"| "up"| "down"` | "left" | Direction of motion | | ||
| direction | `left | right| up| down` | `left` | Direction of motion | | ||
| speed| number | 50 | Pixel per second | | ||
@@ -52,4 +52,2 @@ | pauseOnHover| boolean | false | `true` pauses the animation on hover | | ||
# Status | ||
In beta | ||
In beta |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
45703
457
49