Skip to content

Commit fe61ef7

Browse files
committed
fix: zdog animated.ts
1 parent 032c60b commit fe61ef7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

targets/zdog/src/animated.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Zdog from 'react-zdog'
21
import {
32
ElementType,
43
ComponentPropsWithRef,
@@ -7,9 +6,9 @@ import {
76
import { FluidValue } from '@react-spring/shared'
87
import { primitives } from './primitives'
98

10-
type Primitives = typeof primitives[number]
9+
type Primitives = typeof primitives
1110
type AnimatedPrimitives = {
12-
[P in Primitives]: AnimatedComponent<typeof Zdog[P]>
11+
[P in keyof Primitives]: AnimatedComponent<Primitives[P]>
1312
}
1413

1514
/** The type of the `animated()` function */
@@ -18,9 +17,8 @@ export type WithAnimated = {
1817
} & AnimatedPrimitives
1918

2019
/** The type of an `animated()` component */
21-
export type AnimatedComponent<
22-
T extends ElementType
23-
> = ForwardRefExoticComponent<AnimatedProps<ComponentPropsWithRef<T>>>
20+
export type AnimatedComponent<T extends ElementType> =
21+
ForwardRefExoticComponent<AnimatedProps<ComponentPropsWithRef<T>>>
2422

2523
/** The props of an `animated()` component */
2624
export type AnimatedProps<Props extends object> = {

0 commit comments

Comments
 (0)