Skip to content

Commit 213459e

Browse files
committed
fix(styles): Fix StateBadge tests
StateBadge component will have some styles trough props. Revert to use StyleSheet in this case. #532
1 parent 5149188 commit 213459e

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

src/components/issue-description.component.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { ActivityIndicator } from 'react-native';
2+
import { StyleSheet, ActivityIndicator } from 'react-native';
33
import { ListItem } from 'react-native-elements';
44
import Parse from 'parse-diff';
55
import moment from 'moment/min/moment-with-locales.min';
@@ -16,6 +16,13 @@ import { translate } from 'utils';
1616
import { colors, styledFonts, normalize } from 'config';
1717
import { v3 } from 'api';
1818

19+
const styles = StyleSheet.create({
20+
badge: {
21+
alignItems: 'flex-end',
22+
justifyContent: 'center',
23+
},
24+
});
25+
1926
const HeaderContainer = styled.View`
2027
flex-direction: row;
2128
align-items: center;
@@ -50,11 +57,6 @@ const DiffBlocksContainer = styled.View`
5057
padding-bottom: 10;
5158
`;
5259

53-
const StateBadgeStyled = styled(StateBadge)`
54-
align-items: flex-end;
55-
justify-content: center;
56-
`;
57-
5860
const LabelButtonGroup = styled.View`
5961
flex-wrap: wrap;
6062
flex-direction: row;
@@ -151,7 +153,8 @@ export class IssueDescription extends Component {
151153
{!issue.pull_request ||
152154
(issue.pull_request &&
153155
!isPendingCheckMerge && (
154-
<StateBadgeStyled
156+
<StateBadge
157+
style={styles.badge}
155158
issue={issue}
156159
isMerged={isMerged && issue.pull_request}
157160
locale={locale}

0 commit comments

Comments
 (0)