Skip to content

Commit 9566323

Browse files
committed
Map cssOffset and cssFloat in keyframe to actual name
1 parent 245c772 commit 9566323

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/hooks/core.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ export interface AnimationOptions
2626
}
2727

2828
export const getKeyframeKeys = (keyframes: TypedKeyframe[]): string[] =>
29-
uniqBy(keyframes.flatMap((k) => getKeys(k)));
29+
uniqBy(keyframes.flatMap(getKeys)).map((k) => {
30+
if (k === "cssFloat") {
31+
return "float";
32+
} else if (k === "cssOffset") {
33+
return "offset";
34+
} else {
35+
return k;
36+
}
37+
});
3038

3139
export const createAnimation = (
3240
el: HTMLElement | null,

0 commit comments

Comments
 (0)