UNPKG

windups

Version:

A unique typewriter effect library for React.

18 lines (17 loc) 595 B
import { Windup } from "../Windup"; import { HookMetadata } from "./useWindup"; export declare type WindupOptions = { onChar?: (char: string) => void; onFinished?: () => void; pace?: (char: string) => number; skipped?: boolean; }; export declare type StringMetadata = HookMetadata; export declare type StringWindup = Windup<string, StringMetadata>; export default function useWindupString(text: string, options?: WindupOptions): [string, { skip: () => void; pause: () => void; resume: () => void; rewind: () => void; isFinished: boolean; }];