
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
react-timeline-animation
Advanced tools
npm install --save react-timeline-animation
or
yarn add react-timeline-animation
Important to add a unique id to the observed element (id="timeline100500").
<div id="timeline100500" ref={timeline} className="timeline" />;
Component using react "render prop" pattern.
<TimelineObserver
initialColor="#e5e5e5"
fillColor="#53b374"
handleObserve={(setObserver) => (
<Timeline
callback={onCallback}
className="timeline"
setObserver={setObserver}
/>
)}
/>;
const Timeline = ({ setObserver, callback }) => {
const timeline = useRef(null);
// It Will be fired when the element crossed the middle of the screen.
const someCallback = () => {
callback();
};
useEffect(() => {
if (timeline.current) {
setObserver(timeline.current, someCallback);
}
}, []);
return <div id="timeline100500" ref={timeline} className="timeline" />;
};
initialColor
: not required. Initial color of observable element.fillColor
: not required. Color to fill element.handleObserve
: required. "render prop" to handle observable element.hasReverse
: not required. Allow to scroll in both directions.interface TimelineObserverProps {
handleObserve?: (
observer: (target: Element, callbackFn?: () => void) => void
) => JSX.Element;
initialColor?: string;
fillColor?: string;
hasReverse?: boolean;
}
FAQs
Scroll animation component
The npm package react-timeline-animation receives a total of 100 weekly downloads. As such, react-timeline-animation popularity was classified as not popular.
We found that react-timeline-animation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.