()
| 4 | import { Animated, Animator, AnimatorGeneralProvider, Text } from '@arwes/react' |
| 5 | |
| 6 | const 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 | |
| 30 | const ExampleTextDecipher = (): JSX.Element => { |
| 31 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected