Skip to content

Commit

Permalink
fix: [#175848198,#175641468] Fixed: overlapping label when message is…
Browse files Browse the repository at this point in the history
… too long, label text not being centered in its wrapper (#2475)

* missing label overlapping fix

* fixed badge overlapping, took freedom to remove unnecessary Views

Co-authored-by: Matteo Boschi <[email protected]>
  • Loading branch information
DavideValdo and Undermaken authored Dec 1, 2020
1 parent 0d51036 commit 676bd90
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions ts/components/DetailedlistItemComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,20 @@ const styles = StyleSheet.create({
flexDirection: "row",
minHeight: 24
},
badgeInfoExpired: {
backgroundColor: IOColors.white,
borderColor: IOColors.red,
text3SubContainer: { width: `95%` },
badgeInfo: {
borderWidth: 1,
borderStyle: "solid",
width: 65,
height: 22
height: 25,
flexDirection: "row"
},
badgeInfoExpired: {
backgroundColor: IOColors.white,
borderColor: IOColors.red
},
badgeInfoPaid: {
backgroundColor: IOColors.aqua,
width: 65,
height: 22
backgroundColor: IOColors.aqua
}
});

Expand Down Expand Up @@ -140,23 +142,21 @@ export default class DetailedlistItemComponent extends React.PureComponent<
<BadgeComponent />
</View>
)}
<H3 numberOfLines={2}>{this.props.text3}</H3>
<View style={styles.text3SubContainer}>
<H3 numberOfLines={2}>{this.props.text3}</H3>
</View>
</View>

<View style={styles.icon}>
{this.props.isExpired && (
<View>
<Badge style={styles.badgeInfoExpired}>
<H5 color="red">{I18n.t("messages.badge.expired")}</H5>
</Badge>
</View>
<Badge style={[styles.badgeInfo, styles.badgeInfoExpired]}>
<H5 color="red">{I18n.t("messages.badge.expired")}</H5>
</Badge>
)}
{this.props.isPaid && (
<View>
<Badge style={styles.badgeInfoPaid}>
<H5 color="bluegreyDark">{I18n.t("messages.badge.paid")}</H5>
</Badge>
</View>
<Badge style={[styles.badgeInfo, styles.badgeInfoPaid]}>
<H5 color="bluegreyDark">{I18n.t("messages.badge.paid")}</H5>
</Badge>
)}

<IconFont
Expand Down

0 comments on commit 676bd90

Please sign in to comment.