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

Function Example

apps/docs/src/app/docs/develop/react/text/ExampleTextDecipher.tsx:6–28  ·  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 ? 2_000 : 1_500)
11 return () => clearTimeout(tid)
12 }, [active])
13
14 return (
15 <AnimatorGeneralProvider disabled={false} dismissed={false} duration={{ enter: 1, 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 className="!m-0 !font-code !text-size-4" manager="decipher" fixed>
22 Pillars of Creation
23 </Text>
24 </Animated>
25 </Animator>
26 </AnimatorGeneralProvider>
27 )
28}
29
30const ExampleTextDecipher = (): JSX.Element => {
31 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected