mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 05:42:33 +03:00
added comments placeholder animation
This commit is contained in:
parent
804b76688d
commit
202bae5e03
@ -1,30 +1,39 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import Placeholder from 'rn-placeholder';
|
|
||||||
|
|
||||||
import { ThemeContainer } from '../../../../containers';
|
import { ThemeContainer } from '../../../../containers';
|
||||||
|
import LottieView from 'lottie-react-native';
|
||||||
|
|
||||||
import styles from './listItemPlaceHolderStyles';
|
import styles from './listItemPlaceHolderStyles';
|
||||||
|
|
||||||
const CommentPlaceHolderView = () => {
|
const CommentPlaceHolderView = () => {
|
||||||
|
|
||||||
|
|
||||||
|
const animationStyle = {
|
||||||
|
width:300, height: 72
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContainer>
|
<ThemeContainer>
|
||||||
{({ isDarkTheme }) => {
|
{({ isDarkTheme }) => {
|
||||||
const color = isDarkTheme ? '#2e3d51' : '#f5f5f5';
|
const color = isDarkTheme ? '#2e3d51' : '#f5f5f5';
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.paragraphWithoutMargin}>
|
<LottieView
|
||||||
<Placeholder.Paragraph
|
style={animationStyle}
|
||||||
color={color}
|
source={require('../../../../assets/animations/commentBody.json')}
|
||||||
lineNumber={3}
|
autoPlay
|
||||||
textSize={12}
|
loop={true}
|
||||||
lineSpacing={8}
|
autoSize={true}
|
||||||
width="100%"
|
resizeMode='cover'
|
||||||
lastLineWidth="70%"
|
colorFilters={[
|
||||||
firstLineWidth="50%"
|
{
|
||||||
animate="fade"
|
keypath:'comments',
|
||||||
|
color:color
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user