DefinitelyTyped/types/react-typing-animation/react-typing-animation-tests.tsx
Haseeb Majid 028c46f833
Update react-typing-animation (#42322)
* Added React Native Share Extension

* Fixed Linting Issues

Fixed linting issues, added tests.

* Fixed other linting issues

Data returns a promise.

* Removed Public from state

Removed public from state.

* Added react-typing-animation

Added react-typing-animation.

* Updated react-typing-animation

Updated the react-typing-animation definitions
with the extra components such as delay, backspace.
2020-02-12 16:17:05 -08:00

43 lines
1.0 KiB
TypeScript

import * as React from 'react';
import Typing from 'react-typing-animation';
const AnimatedTypingComponent = () => (
<Typing>
<span>This span will get typed.</span>
</Typing>
);
const AnimatedBackspaceComponent = () => (
<Typing>
<span>This span will get typed, then erased.</span>
<Typing.Backspace count={20} />
</Typing>
);
const AnimatedDelayComponent = () => (
<Typing>
<div>
There will be a 1000ms delay here,
<Typing.Delay ms={1000} />
then this will be typed.
</div>
</Typing>
);
const AnimatedSpeedComponent = () => (
<Typing speed={50}>
This line will be typed at 50ms/character,
<Typing.Speed ms={200} />
then this will be typed at 200ms/character.
</Typing>
);
const AnimatedResetComponent = () => (
<Typing>
<span>This line will stay.</span>
<span>This line will get instantly removed after a 500 ms delay</span>
<Typing.Reset count={1} delay={500} />
</Typing>
);