diff options
author | dan <dan.abramov@gmail.com> | 2024-01-25 01:38:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 01:38:23 +0000 |
commit | 63fbdede42fe28846e552dd64ff7f0fce829a3f8 (patch) | |
tree | 046f6ed452844877dccd9042188d75581502f985 /src/view/com/util/post-ctrls/RepostButton.web.tsx | |
parent | e111a31c1d150deef3f705367e48660dd419def4 (diff) | |
download | voidsky-63fbdede42fe28846e552dd64ff7f0fce829a3f8.tar.zst |
Clean up the post controls UI (#2614)
* Hide zeros on post ctrls * Align buttons between posts * Update loading placeholders * Remove unused
Diffstat (limited to 'src/view/com/util/post-ctrls/RepostButton.web.tsx')
-rw-r--r-- | src/view/com/util/post-ctrls/RepostButton.web.tsx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.web.tsx b/src/view/com/util/post-ctrls/RepostButton.web.tsx index 329382132..a888178a3 100644 --- a/src/view/com/util/post-ctrls/RepostButton.web.tsx +++ b/src/view/com/util/post-ctrls/RepostButton.web.tsx @@ -69,19 +69,18 @@ export const RepostButton = ({ const inner = ( <View style={[ - styles.control, - !big && styles.controlPad, + styles.container, (isReposted ? styles.reposted : defaultControlColor) as StyleProp<ViewStyle>, ]}> <RepostIcon strokeWidth={2.2} size={big ? 24 : 20} /> - {typeof repostCount !== 'undefined' ? ( + {typeof repostCount !== 'undefined' && repostCount > 0 ? ( <Text testID="repostCount" type={isReposted ? 'md-bold' : 'md'} style={styles.repostCount}> - {repostCount ?? 0} + {repostCount} </Text> ) : undefined} </View> @@ -110,15 +109,11 @@ export const RepostButton = ({ } const styles = StyleSheet.create({ - control: { - display: 'flex', + container: { flexDirection: 'row', alignItems: 'center', gap: 4, }, - controlPad: { - padding: 5, - }, reposted: { color: colors.green3, }, |