INNER CODE UNIT · JavaScript
SteppedAnimatedTerminal
layer5io/layer5 · src/components/Animated-steps-list/Stepped-animated-terminal/index.js:4
const SteppedAnimatedTerminal = ({ activeIndex, steps }) => {
const [currentIndex, setCurrentIndex] = useState(activeIndex);
if (activeIndex != currentIndex) {
setCurrentIndex(activeIndex);
}
return (
<AnimatedTerminal
frameLength={steps[activeIndex].frameLength}
loop={steps[activeIndex].loop}
lines={steps[activeIndex].lines}
/>
);
};
export default SteppedAnimatedTerminal;