File size: 914 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { Globals } from '@react-spring/core'
import { unstable_batchedUpdates } from 'react-dom'
import { createStringInterpolator, colors } from '@react-spring/shared'
import { createHost } from '@react-spring/animated'
import { applyAnimatedValues } from './applyAnimatedValues'
import { AnimatedStyle } from './AnimatedStyle'
import { WithAnimated } from './animated'
import { primitives } from './primitives'
Globals.assign({
batchedUpdates: unstable_batchedUpdates,
createStringInterpolator,
colors,
})
const host = createHost(primitives, {
applyAnimatedValues,
createAnimatedStyle: style => new AnimatedStyle(style),
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props,
})
export const animated = host.animated as WithAnimated
export { animated as a }
export * from './animated'
export * from '@react-spring/core'
|