windups
Version:
A unique typewriter effect library for React.
17 lines (16 loc) • 500 B
TypeScript
import { Windup } from "../Windup";
export interface HookMetadata {
onChar?: (char: string) => void;
pace?: (char: string, nextChar: string | undefined) => number;
}
export default function useWindup<M extends HookMetadata>(windupInit: Windup<string, M>, options: {
onFinished?: () => void;
skipped?: boolean;
}): {
windup: Windup<string, M>;
skip: () => void;
pause: () => void;
resume: () => void;
rewind: () => void;
isFinished: boolean;
};