14 lines
498 B
TypeScript
14 lines
498 B
TypeScript
'use strict';
|
|
import type { StyleProps, WrapperRef } from '../commonTypes';
|
|
import type { AnimatedRef } from '../hook/commonTypes';
|
|
import type { ReanimatedHTMLElement } from '../ReanimatedModule/js-reanimated';
|
|
import { _updatePropsJS } from '../ReanimatedModule/js-reanimated';
|
|
|
|
export function setNativeProps<TRef extends WrapperRef>(
|
|
animatedRef: AnimatedRef<TRef>,
|
|
updates: StyleProps
|
|
) {
|
|
const component = animatedRef() as ReanimatedHTMLElement;
|
|
_updatePropsJS(updates, component);
|
|
}
|