Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions src/repository/screens/repository.screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import styled from 'styled-components';
import {
StyleSheet,
RefreshControl,
Share,
ActivityIndicator,
} from 'react-native';
import { RefreshControl, Share, ActivityIndicator } from 'react-native';
import { ListItem } from 'react-native-elements';
import ActionSheet from 'react-native-actionsheet';
import { RestClient } from 'api';
Expand Down Expand Up @@ -74,16 +69,16 @@ const LoadingMembersContainer = styled.View`
padding: 5px;
`;

const styles = StyleSheet.create({
listTitle: {
const SectionListItem = styled(ListItem).attrs({
titleStyle: {
color: colors.black,
...fonts.fontPrimary,
},
listContainerStyle: {
containerStyle: {
borderBottomColor: colors.greyLight,
borderBottomWidth: 1,
},
});
})``;

class Repository extends Component {
props: {
Expand Down Expand Up @@ -366,15 +361,13 @@ class Repository extends Component {
{!hasError && (
<SectionList title={t('SOURCE', locale)}>
{showReadMe && (
<ListItem
<SectionListItem
title={t('README', locale)}
leftIcon={{
name: 'book',
color: colors.grey,
type: 'octicon',
}}
titleStyle={styles.listTitle}
containerStyle={styles.listContainerStyle}
onPress={() =>
navigation.navigate('ReadMe', {
repository,
Expand All @@ -383,10 +376,8 @@ class Repository extends Component {
underlayColor={colors.greyLight}
/>
)}
<ListItem
<SectionListItem
title={t('View Code', locale)}
titleStyle={styles.listTitle}
containerStyle={styles.listContainerStyle}
leftIcon={{
name: 'code',
color: colors.grey,
Expand Down