react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
25 lines (21 loc) • 697 B
text/typescript
;
import type { PlainStyle } from '../../../common';
import { CSSKeyframesRuleBase } from '../../models';
import type { CSSAnimationKeyframes } from '../../types';
import { processKeyframeDefinitions } from '../animationParser';
export default class CSSKeyframesRuleImpl<
S extends PlainStyle = PlainStyle,
> extends CSSKeyframesRuleBase<S> {
private processedKeyframes_: string;
constructor(
keyframes: CSSAnimationKeyframes<S>,
processedKeyframes?: string
) {
super(keyframes);
this.processedKeyframes_ =
processedKeyframes ?? processKeyframeDefinitions(keyframes);
}
get processedKeyframes(): string {
return this.processedKeyframes_;
}
}