mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 11:21:41 +03:00
added comments placeholder animation
This commit is contained in:
parent
804b76688d
commit
202bae5e03
@ -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>
|
||||
);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user