react-fast-marquee
Advanced tools
Comparing version 1.0.11 to 1.1.0
@@ -1,2 +0,2 @@ | ||
import * as React from "react"; | ||
import React from "react"; | ||
import "./Marquee.scss"; | ||
@@ -71,2 +71,5 @@ interface MarqueeProps { | ||
/** | ||
* Whether to render with | ||
*/ | ||
/** | ||
* The children rendered inside the marquee | ||
@@ -73,0 +76,0 @@ * Type: ReactNode |
@@ -23,2 +23,6 @@ | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
/*! ***************************************************************************** | ||
@@ -59,2 +63,6 @@ Copyright (c) Microsoft Corporation. | ||
var _u = React.useState(0), duration = _u[0], setDuration = _u[1]; | ||
var _v = React.useState(false), isMounted = _v[0], setIsMounted = _v[1]; | ||
React.useEffect(function () { | ||
setIsMounted(true); | ||
}, []); | ||
var containerRef = React.useRef(null); | ||
@@ -77,4 +85,4 @@ var marqueeRef = React.useRef(null); | ||
var rgbaGradientColor = "rgba(" + gradientColor[0] + ", " + gradientColor[1] + ", " + gradientColor[2]; | ||
return (React.createElement("div", { ref: containerRef, style: __assign(__assign({}, style), (_b = {}, _b["--pause-on-hover"] = pauseOnHover ? "paused" : "running", _b["--pause-on-click"] = pauseOnClick ? "paused" : "running", _b)), className: className + " marquee-container" }, | ||
gradient && (React.createElement("div", { style: (_c = {}, | ||
return (React__default['default'].createElement(React.Fragment, null, !isMounted ? null : (React__default['default'].createElement("div", { ref: containerRef, style: __assign(__assign({}, style), (_b = {}, _b["--pause-on-hover"] = pauseOnHover ? "paused" : "running", _b["--pause-on-click"] = pauseOnClick ? "paused" : "running", _b)), className: className + " marquee-container" }, | ||
gradient && (React__default['default'].createElement("div", { style: (_c = {}, | ||
_c["--gradient-color"] = rgbaGradientColor + ", 1), " + rgbaGradientColor + ", 0)", | ||
@@ -85,3 +93,3 @@ _c["--gradient-width"] = typeof gradientWidth === "number" | ||
_c), className: "overlay" })), | ||
React.createElement("div", { ref: marqueeRef, style: (_d = {}, | ||
React__default['default'].createElement("div", { ref: marqueeRef, style: (_d = {}, | ||
_d["--play"] = play ? "running" : "paused", | ||
@@ -91,5 +99,7 @@ _d["--direction"] = direction === "left" ? "normal" : "reverse", | ||
_d["--delay"] = delay + "s", | ||
_d["--margin-right"] = (marqueeWidth < containerWidth ? containerWidth - marqueeWidth : 0) + "px", | ||
_d["--margin-right"] = (marqueeWidth < containerWidth | ||
? containerWidth - marqueeWidth | ||
: 0) + "px", | ||
_d), className: "marquee" }, children), | ||
React.createElement("div", { style: (_e = {}, | ||
React__default['default'].createElement("div", { style: (_e = {}, | ||
_e["--play"] = play ? "running" : "paused", | ||
@@ -99,4 +109,6 @@ _e["--direction"] = direction === "left" ? "normal" : "reverse", | ||
_e["--delay"] = delay + "s", | ||
_e["--margin-right"] = (marqueeWidth < containerWidth ? containerWidth - marqueeWidth : 0) + "px", | ||
_e), className: "marquee" }, children))); | ||
_e["--margin-right"] = (marqueeWidth < containerWidth | ||
? containerWidth - marqueeWidth | ||
: 0) + "px", | ||
_e), className: "marquee" }, children))))); | ||
}; | ||
@@ -103,0 +115,0 @@ |
{ | ||
"name": "react-fast-marquee", | ||
"version": "1.0.11", | ||
"version": "1.1.0", | ||
"description": "A lightweight React component that utilizes the power of CSS animations to create silky smooth marquees.", | ||
@@ -111,4 +111,3 @@ "main": "dist/index.js", | ||
"example": "examples" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
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
24774
186