MCPcopy Create free account
hub / github.com/arwes/arwes / Example

Function Example

apps/docs/src/app/docs/develop/react/text/ExampleTextSequence.tsx:6–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { Animated, Animator, AnimatorGeneralProvider, Text } from '@arwes/react'
5
6const Example = (): JSX.Element => {
7 const [active, setActive] = useState(true)
8
9 useEffect(() => {
10 const tid = setTimeout(() => setActive(!active), active ? 5_000 : 1_500)
11 return () => clearTimeout(tid)
12 }, [active])
13
14 return (
15 <AnimatorGeneralProvider disabled={false} dismissed={false} duration={{ enter: 2, exit: 1 }}>
16 <Animator root active={active}>
17 <Animated
18 className="flex flex-col gap-2 px-8 py-2 bg-primary-main-7/10"
19 hideOnExited={false}
20 >
21 <Text as="div" className="!m-0 text-pretty prose-a:transition-none" fixed>
22 <h3>Nebula</h3>
23
24 <p>
25 A <b>nebula</b> (
26 <a target="_blank" href="/wiki/Latin_language">
27 Latin
28 </a>{' '}
29 for 'cloud, fog'; <abbr>pl.</abbr>: <b>nebulae</b>, <b>nebulæ</b>, or <b>nebulas</b>)
30 is a distinct luminescent part of{' '}
31 <a target="_blank" href="/wiki/Interstellar_medium">
32 interstellar medium
33 </a>
34 , which can consist of ionized, neutral, or molecular{' '}
35 <a target="_blank" href="/wiki/Hydrogen">
36 hydrogen
37 </a>{' '}
38 and also{' '}
39 <a target="_blank" href="/wiki/Cosmic_dust">
40 cosmic dust
41 </a>
42 .
43 </p>
44
45 <p>
46 Nebulae are often star-forming regions, such as in the{' '}
47 <a target="_blank" href="/wiki/Pillars_of_Creation">
48 Pillars of Creation
49 </a>{' '}
50 in the{' '}
51 <a target="_blank" href="/wiki/Eagle_Nebula">
52 Eagle Nebula
53 </a>
54 .
55 </p>
56
57 <p>
58 In these regions, the formations of gas, dust, and other materials "clump" together to
59 form denser regions, which attract further matter and eventually become dense enough
60 to form{' '}
61 <a target="_blank" href="/wiki/Star">
62 stars
63 </a>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected