motion-wave
Version:
A library suitable for generating animated waveforms.
13 lines (12 loc) • 667 B
TypeScript
import * as React from 'react';
import type { WaveConfig } from './createWave';
export declare const useLayoutEffect: typeof React.useLayoutEffect;
export declare const useWave: (config: WaveConfig, ref?: unknown) => readonly [React.RefObject<HTMLCanvasElement>, React.MutableRefObject<{
start: () => void;
setConfig: (config: Partial<WaveConfig>) => void;
motionTo: <K extends keyof WaveConfig>(key: K, value: WaveConfig[K], options: import("from-to.js").Options<WaveConfig[K]>) => import("from-to.js").Controls;
stop: () => void;
reset: () => void;
resize: (width: number, height: number) => void;
currentConfig: WaveConfig;
} | null>];