import React from 'react' import {StyleSheet, Text, TouchableOpacity, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {UpIcon, UpIconSolid, DownIcon, DownIconSolid} from '../../lib/icons' import {s, colors} from '../../lib/styles' interface PostCtrlsOpts { replyCount: number repostCount: number upvoteCount: number downvoteCount: number isReposted: boolean isUpvoted: boolean isDownvoted: boolean onPressReply: () => void onPressToggleRepost: () => void onPressToggleUpvote: () => void onPressToggleDownvote: () => void } export function PostCtrls(opts: PostCtrlsOpts) { return ( {opts.replyCount} {opts.repostCount} {opts.isUpvoted ? ( ) : ( )} {opts.upvoteCount} {opts.isDownvoted ? ( ) : ( )} {opts.downvoteCount} ) } const styles = StyleSheet.create({ ctrls: { flexDirection: 'row', }, ctrl: { flexDirection: 'row', alignItems: 'center', flex: 1, paddingLeft: 4, paddingRight: 4, }, ctrlIcon: { marginRight: 5, color: colors.gray5, }, ctrlIconReposted: { marginRight: 5, color: colors.green3, }, ctrlIconUpvoted: { marginRight: 5, color: colors.red3, }, ctrlIconDownvoted: { marginRight: 5, color: colors.blue3, }, })