added comments placeholder animation

This commit is contained in:
Nouman Tahir 2021-03-05 18:09:03 +05:00
parent 804b76688d
commit 202bae5e03

View File

@ -1,30 +1,39 @@
import React from 'react';
import { View } from 'react-native';
import Placeholder from 'rn-placeholder';
import { ThemeContainer } from '../../../../containers';
import LottieView from 'lottie-react-native';
import styles from './listItemPlaceHolderStyles';
const CommentPlaceHolderView = () => {
const animationStyle = {
width:300, height: 72
}
return (
<ThemeContainer>
{({ isDarkTheme }) => {
const color = isDarkTheme ? '#2e3d51' : '#f5f5f5';
return (
<View style={styles.container}>
<View style={styles.paragraphWithoutMargin}>
<Placeholder.Paragraph
color={color}
lineNumber={3}
textSize={12}
lineSpacing={8}
width="100%"
lastLineWidth="70%"
firstLineWidth="50%"
animate="fade"
<LottieView
style={animationStyle}
source={require('../../../../assets/animations/commentBody.json')}
autoPlay
loop={true}
autoSize={true}
resizeMode='cover'
colorFilters={[
{
keypath:'comments',
color:color
}
]
}
/>
</View>
</View>
);
}}