refactor(styles): Migrate IssueListItem to Styled Components #578
Conversation
Migrate Stylesheet styles to styled components. #532
| align-items: flex-start; | ||
| justify-content: center; | ||
| padding-right: 10; | ||
| padding: 5; |
| paddingVertical: 5, | ||
| borderBottomWidth: 1, | ||
| borderBottomColor: colors.greyLight, | ||
| }, | ||
| closedIssue: { |
|
Can you please add a screenshot of the work you've done? |
| @@ -99,10 +103,10 @@ export const IssueListItem = ({ type, issue, navigation, locale }: Props) => ( | |||
| titleStyle={styles.title} | |||
| subtitleStyle={styles.subtitle} | |||
| /> | |||
machour
Nov 4, 2017
Member
Once #619 is merged, this <ListItem> can be converted as a styled component using this:
const Issue = styled(ListItem).attrs({
containerStyle: {
// old style attributes
},
titleStyle: {
// old style attributes
},
subtitleStyle: {
// old style attributes
}
})``;
machour
Nov 7, 2017
•
Member
#619 is merged, you should now be able to convert the react-native-elements components.
| @@ -99,10 +103,10 @@ export const IssueListItem = ({ type, issue, navigation, locale }: Props) => ( | |||
| titleStyle={styles.title} | |||
| subtitleStyle={styles.subtitle} | |||
| /> | |||
| <View style={styles.commentsContainer}> | |||
| <CommentsContainer> | |||
| <Icon name="comment" type="octicon" size={18} color={colors.grey} /> | |||
machour
Nov 4, 2017
Member
I'm wondering if we should define a new styled component here (same way as ListItem), and have all this static props in the styled component.
The JSX code would then simply be something like: <CommentIcon />
What do you think of this?
|
Hi @josenaranjo, friendly ping, are you still up for this one? |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

I left some StyleSheet styles without migrating because those styles are so specific about a particular behavior that 1. I'm not sure they are going to display the component as expected and 2. It has more meaning as it is. Let me know what you think.
#532