Adjust placeholder to be pixel-perfect (#2650)

This commit is contained in:
dan 2024-01-26 21:45:22 +00:00 committed by GitHub
parent 93133b4864
commit ad3067b581
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,28 +67,36 @@ export function PostLoadingPlaceholder({
<LoadingPlaceholder width="95%" height={6} style={{marginBottom: 8}} /> <LoadingPlaceholder width="95%" height={6} style={{marginBottom: 8}} />
<LoadingPlaceholder width="80%" height={6} style={{marginBottom: 11}} /> <LoadingPlaceholder width="80%" height={6} style={{marginBottom: 11}} />
<View style={styles.postCtrls}> <View style={styles.postCtrls}>
<View style={[styles.postCtrl, {paddingLeft: 0}]}> <View style={styles.postCtrl}>
<CommentBottomArrow <View style={[styles.postBtn, {paddingLeft: 0}]}>
style={[{color: theme.palette.default.icon, marginTop: 1}]} <CommentBottomArrow
strokeWidth={3} style={[{color: theme.palette.default.icon, marginTop: 1}]}
size={15} strokeWidth={3}
/> size={15}
/>
</View>
</View> </View>
<View style={styles.postCtrl}> <View style={styles.postCtrl}>
<RepostIcon <View style={styles.postBtn}>
style={{color: theme.palette.default.icon}} <RepostIcon
strokeWidth={3} style={{color: theme.palette.default.icon}}
size={20} strokeWidth={3}
/> size={20}
/>
</View>
</View> </View>
<View style={styles.postCtrl}> <View style={styles.postCtrl}>
<HeartIcon <View style={styles.postBtn}>
style={{color: theme.palette.default.icon} as ViewStyle} <HeartIcon
size={16} style={{color: theme.palette.default.icon} as ViewStyle}
strokeWidth={3} size={16}
/> strokeWidth={3}
/>
</View>
</View>
<View style={styles.postCtrl}>
<View style={styles.postBtn} />
</View> </View>
<View style={styles.postCtrl} />
</View> </View>
</View> </View>
</View> </View>
@ -279,6 +287,9 @@ const styles = StyleSheet.create({
justifyContent: 'space-between', justifyContent: 'space-between',
}, },
postCtrl: { postCtrl: {
flex: 1,
},
postBtn: {
padding: 5, padding: 5,
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',