import { useCallback, useEffect, useRef, useState } from "react"; import { Button, ButtonLink, H1,H2,H3,H4,H5,H6,P,Label, LoadingBar, LoadingDotsTyping, LoadingDotsBricks, } from "~/components"; export default function ComponentLibrary () { const [progress, setProgress] = useState(0); const loopRef = useRef(null); const pushProgressBar: ()=>void = useCallback(()=>{ loopRef.current = setInterval(function timer(){ setProgress((curr)=>{ if (curr < 100){ return curr+10; }else{ if(loopRef.current) clearInterval(loopRef.current); return curr; } })} , 3000); }, []); useEffect(()=>{ pushProgressBar(); return ()=>{ if(loopRef.current) clearInterval(loopRef.current) } },[progress]); return(

Typography

H1. This is an H1 Heading

H2. This is an H2 Heading

H3. This is an H3 Heading

H4. This is an H4 Heading

P. Is an normal Paragraph

H5. This is an H5 Heading
H6. This is an H6 Heading

Components

Buttons

ButtonLink

Back to /

Loading Dots

Loading Bar

); };