|
|
@ -734,9 +734,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { |
|
|
|
if (x.typewriter && !typeWriterIndexes.current.includes(index)) { |
|
|
|
if (x.typewriter && !typeWriterIndexes.current.includes(index)) { |
|
|
|
typeWriterIndexes.current.push(index) |
|
|
|
typeWriterIndexes.current.push(index) |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className={classNameBlock} data-id="block" key={index}> <span ref={(element) => { |
|
|
|
<div className={classNameBlock} data-id="block" key={index}> |
|
|
|
typewrite(element, msg ? msg.toString() : null) |
|
|
|
<span ref={(element) => { |
|
|
|
}} className={x.style}></span></div> |
|
|
|
typewrite(element, msg ? msg.toString() : null) |
|
|
|
|
|
|
|
}} className={x.style}> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
) |
|
|
|
) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -804,6 +807,7 @@ const typewrite = (elementsRef, message) => { |
|
|
|
(() => { |
|
|
|
(() => { |
|
|
|
let count = 0 |
|
|
|
let count = 0 |
|
|
|
const id = setInterval(() => { |
|
|
|
const id = setInterval(() => { |
|
|
|
|
|
|
|
if (!elementsRef) return |
|
|
|
count++ |
|
|
|
count++ |
|
|
|
elementsRef.innerText = message.substr(0, count) |
|
|
|
elementsRef.innerText = message.substr(0, count) |
|
|
|
if (message === count) clearInterval(id)
|
|
|
|
if (message === count) clearInterval(id)
|
|
|
|