earthtoday-react-motion
Version:
A spring that solves your animation problems.
16 lines (13 loc) • 326 B
JavaScript
/* @flow */
import presets from './presets';
import type { OpaqueConfig, SpringHelperConfig } from './Types';
const defaultConfig = {
...presets.noWobble,
precision: 0.01,
};
export default function spring(
val: number,
config?: SpringHelperConfig,
): OpaqueConfig {
return { ...defaultConfig, ...config, val };
}