import { Box, MantineSize, Text, SimpleGrid } from "@mantine/core"; import classes from './TextChain.module.css' import { useState, useEffect } from "react"; interface TextChainProps { text: string; mt?: MantineSize; } export function TextChain(props : TextChainProps) { const text = props.text; const [mounted, setMounted] = useState([]); useEffect(() => { const words = text.split(" "); setMounted(new Array(words.length).fill(false)); words.forEach((_, index) => { setTimeout(() => { setMounted(prev => { const newMounted = [...prev]; newMounted[index] = true; return newMounted; }); }, index * 50); }); }, [text]); return ( Your seed phrase: {text.split(" ").map((v, i) => { return ( {i + 1}. {v} ); })} ) }