bold payout value in post display screen

This commit is contained in:
Nouman Tahir 2022-11-07 17:25:18 +05:00
parent b307ad753b
commit 0b997ab1ce
4 changed files with 15 additions and 3 deletions

View File

@ -140,6 +140,7 @@ const PostDisplayView = ({
content={post}
handleCacheVoteIncrement={_handleCacheVoteIncrement}
parentType={parentPost ? postTypes.COMMENT : postTypes.POST}
boldPayout={true}
/>
<TextWithIcon
iconName="heart-outline"

View File

@ -40,6 +40,7 @@ const UpvoteContainer = (props) => {
handleCacheVoteIncrement,
fetchPost,
parentType,
boldPayout,
} = props;
const [isVoted, setIsVoted] = useState(null);
@ -213,6 +214,7 @@ const UpvoteContainer = (props) => {
breakdownPayout={breakdownPayout}
fetchPost={fetchPost}
onVote={_onVote}
boldPayout={boldPayout}
/>
);
};

View File

@ -45,12 +45,12 @@ export default EStyleSheet.create({
},
amount: {
fontSize: 10,
fontWeight:'bold',
fontWeight: 'bold',
color: '$primaryDarkGray',
marginLeft: 8,
},
percent: {
fontWeight:'bold',
fontWeight: 'bold',
color: '$primaryDarkGray',
marginRight: 5,
},
@ -81,6 +81,9 @@ export default EStyleSheet.create({
color: '$primaryDarkGray',
marginLeft: 8,
},
boldText: {
fontWeight: 'bold',
},
declinedPayout: {
textDecorationLine: 'line-through',
textDecorationStyle: 'solid',

View File

@ -50,6 +50,7 @@ interface UpvoteViewProps {
postUpvotePercent: number;
commentUpvotePercent: number;
parentType: string;
boldPayout?: boolean;
}
const UpvoteView = ({
@ -76,6 +77,7 @@ const UpvoteView = ({
postUpvotePercent,
commentUpvotePercent,
parentType,
boldPayout,
}: UpvoteViewProps) => {
const intl = useIntl();
const userActivityMutation = useUserActivityMutation();
@ -304,7 +306,11 @@ const UpvoteView = ({
{isShowPayoutValue && (
<TextButton
style={styles.payoutTextButton}
textStyle={[styles.payoutValue, isDeclinedPayout && styles.declinedPayout]}
textStyle={[
styles.payoutValue,
isDeclinedPayout && styles.declinedPayout,
boldPayout && styles.boldText,
]}
text={<FormattedCurrency value={_shownPayout || '0.000'} />}
onPress={() => {
openPopover();