verdnatura-chat/app/lib/methods/helpers/layoutAnimation.ts

28 lines
578 B
TypeScript
Raw Permalink Normal View History

import { LayoutAnimation } from 'react-native';
import { debounce } from '.';
import { isIOS } from './deviceInfo';
export const animateNextTransition = debounce(
() => {
if (isIOS) {
LayoutAnimation.configureNext({
duration: 200,
create: {
type: LayoutAnimation.Types.easeInEaseOut,
property: LayoutAnimation.Properties.opacity
},
update: {
type: LayoutAnimation.Types.easeInEaseOut
},
delete: {
type: LayoutAnimation.Types.easeInEaseOut,
property: LayoutAnimation.Properties.opacity
}
});
}
},
200,
true
);