diff --git a/src/components/Amicale/Vote/VoteResults.js b/src/components/Amicale/Vote/VoteResults.js index 5e69d4f..047163e 100644 --- a/src/components/Amicale/Vote/VoteResults.js +++ b/src/components/Amicale/Vote/VoteResults.js @@ -13,6 +13,10 @@ import {FlatList, StyleSheet} from 'react-native'; import i18n from 'i18n-js'; import type {VoteTeamType} from '../../../screens/Amicale/VoteScreen'; import type {CustomThemeType} from '../../../managers/ThemeManager'; +import type { + CardTitleIconPropsType, + ListIconPropsType, +} from '../../../constants/PaperStyles'; type PropsType = { teams: Array, @@ -78,10 +82,10 @@ class VoteResults extends React.Component { + left={(iconProps: ListIconPropsType): React.Node => isWinner ? ( @@ -111,8 +115,8 @@ class VoteResults extends React.Component { subtitle={`${i18n.t('screens.vote.results.subtitle')} ${ props.dateEnd }`} - left={({size}: {size: number}): React.Node => ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/components/Amicale/Vote/VoteSelect.js b/src/components/Amicale/Vote/VoteSelect.js index 68df5ec..0a3927f 100644 --- a/src/components/Amicale/Vote/VoteSelect.js +++ b/src/components/Amicale/Vote/VoteSelect.js @@ -8,6 +8,7 @@ import ConnectionManager from '../../../managers/ConnectionManager'; import LoadingConfirmDialog from '../../Dialogs/LoadingConfirmDialog'; import ErrorDialog from '../../Dialogs/ErrorDialog'; import type {VoteTeamType} from '../../../screens/Amicale/VoteScreen'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { teams: Array, @@ -99,8 +100,8 @@ export default class VoteSelect extends React.PureComponent< ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/components/Amicale/Vote/VoteTease.js b/src/components/Amicale/Vote/VoteTease.js index 21b6eb3..22b80ea 100644 --- a/src/components/Amicale/Vote/VoteTease.js +++ b/src/components/Amicale/Vote/VoteTease.js @@ -4,6 +4,7 @@ import * as React from 'react'; import {Avatar, Card, Paragraph} from 'react-native-paper'; import {StyleSheet} from 'react-native'; import i18n from 'i18n-js'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { startDate: string, @@ -30,8 +31,8 @@ export default class VoteTease extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/components/Amicale/Vote/VoteWait.js b/src/components/Amicale/Vote/VoteWait.js index 624ad71..4f078bc 100644 --- a/src/components/Amicale/Vote/VoteWait.js +++ b/src/components/Amicale/Vote/VoteWait.js @@ -1,15 +1,11 @@ // @flow import * as React from 'react'; -import { - ActivityIndicator, - Card, - Paragraph, - withTheme, -} from 'react-native-paper'; +import {Avatar, Card, Paragraph, withTheme} from 'react-native-paper'; import {StyleSheet} from 'react-native'; import i18n from 'i18n-js'; import type {CustomThemeType} from '../../../managers/ThemeManager'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { startDate: string | null, @@ -45,8 +41,8 @@ class VoteWait extends React.Component { : i18n.t('screens.vote.wait.titleEnded') } subtitle={i18n.t('screens.vote.wait.subtitle')} - left={({size}: {size: number}): React.Node => ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/components/Animations/AnimatedAccordion.js b/src/components/Animations/AnimatedAccordion.js index 5e4acb9..2b210cb 100644 --- a/src/components/Animations/AnimatedAccordion.js +++ b/src/components/Animations/AnimatedAccordion.js @@ -6,6 +6,7 @@ import {List, withTheme} from 'react-native-paper'; import Collapsible from 'react-native-collapsible'; import * as Animatable from 'react-native-animatable'; import type {CustomThemeType} from '../../managers/ThemeManager'; +import type {ListIconPropsType} from '../../constants/PaperStyles'; type PropsType = { theme: CustomThemeType, @@ -91,14 +92,13 @@ class AnimatedAccordion extends React.Component { subtitle={props.subtitle} titleStyle={state.expanded ? {color: colors.primary} : null} onPress={this.toggleAccordion} - right={({size}: {size: number}): React.Node => ( + right={(iconProps: ListIconPropsType): React.Node => ( )} left={props.left} diff --git a/src/components/Home/ActionsDashboardItem.js b/src/components/Home/ActionsDashboardItem.js index 24efae0..984cdfe 100644 --- a/src/components/Home/ActionsDashboardItem.js +++ b/src/components/Home/ActionsDashboardItem.js @@ -6,6 +6,7 @@ import {View} from 'react-native'; import i18n from 'i18n-js'; import {StackNavigationProp} from '@react-navigation/stack'; import type {CustomThemeType} from '../../managers/ThemeManager'; +import type {ListIconPropsType} from '../../constants/PaperStyles'; type PropsType = { navigation: StackNavigationProp, @@ -19,19 +20,27 @@ class ActionsDashBoardItem extends React.Component { } render(): React.Node { - const {props} = this; + const {navigation} = this.props; return ( ( - + left={(props: ListIconPropsType): React.Node => ( + )} - right={({size}: {size: number}): React.Node => ( - + right={(props: ListIconPropsType): React.Node => ( + )} - onPress={(): void => props.navigation.navigate('feedback')} + onPress={(): void => navigation.navigate('feedback')} style={{ paddingTop: 0, paddingBottom: 0, diff --git a/src/components/Home/EventDashboardItem.js b/src/components/Home/EventDashboardItem.js index 6fb948e..896238c 100644 --- a/src/components/Home/EventDashboardItem.js +++ b/src/components/Home/EventDashboardItem.js @@ -11,6 +11,7 @@ import { import {StyleSheet, View} from 'react-native'; import i18n from 'i18n-js'; import type {CustomThemeType} from '../../managers/ThemeManager'; +import type {CardTitleIconPropsType} from '../../constants/PaperStyles'; type PropsType = { eventNumber: number, @@ -76,11 +77,11 @@ class EventDashBoardItem extends React.Component { titleStyle={{color: textColor}} subtitle={subtitle} subtitleStyle={{color: textColor}} - left={(): React.Node => ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( )} diff --git a/src/components/Lists/Clubs/ClubListHeader.js b/src/components/Lists/Clubs/ClubListHeader.js index d245d78..9cd5395 100644 --- a/src/components/Lists/Clubs/ClubListHeader.js +++ b/src/components/Lists/Clubs/ClubListHeader.js @@ -7,6 +7,7 @@ import i18n from 'i18n-js'; import AnimatedAccordion from '../../Animations/AnimatedAccordion'; import {isItemInCategoryFilter} from '../../../utils/Search'; import type {ClubCategoryType} from '../../../screens/Amicale/Clubs/ClubListScreen'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { categories: Array, @@ -74,8 +75,8 @@ class ClubListHeader extends React.Component { ( - + left={(props: ListIconPropsType): React.Node => ( + )} opened> diff --git a/src/components/Lists/DashboardEdit/DashboardEditItem.js b/src/components/Lists/DashboardEdit/DashboardEditItem.js index bbfcbc2..546cdbe 100644 --- a/src/components/Lists/DashboardEdit/DashboardEditItem.js +++ b/src/components/Lists/DashboardEdit/DashboardEditItem.js @@ -5,6 +5,7 @@ import {Image} from 'react-native'; import {List, withTheme} from 'react-native-paper'; import type {CustomThemeType} from '../../../managers/ThemeManager'; import type {ServiceItemType} from '../../../managers/ServicesManager'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { item: ServiceItemType, @@ -21,36 +22,36 @@ class DashboardEditItem extends React.Component { } render(): React.Node { - const {props} = this; + const {item, onPress, height, isActive, theme} = this.props; return ( ( )} - right={({size}: {size: number}): React.Node => - props.isActive ? ( + right={(props: ListIconPropsType): React.Node => + isActive ? ( ) : null } style={{ - height: props.height, + height, justifyContent: 'center', paddingLeft: 30, - backgroundColor: props.isActive - ? props.theme.colors.proxiwashFinishedColor + backgroundColor: isActive + ? theme.colors.proxiwashFinishedColor : 'transparent', }} /> diff --git a/src/components/Lists/PlanexGroups/GroupListAccordion.js b/src/components/Lists/PlanexGroups/GroupListAccordion.js index f9788b4..7fb33ed 100644 --- a/src/components/Lists/PlanexGroups/GroupListAccordion.js +++ b/src/components/Lists/PlanexGroups/GroupListAccordion.js @@ -11,6 +11,7 @@ import type { PlanexGroupCategoryType, } from '../../../screens/Planex/GroupSelectionScreen'; import type {CustomThemeType} from '../../../managers/ThemeManager'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { item: PlanexGroupCategoryType, @@ -87,10 +88,10 @@ class GroupListAccordion extends React.Component { height: props.height, justifyContent: 'center', }} - left={({size}: {size: number}): React.Node => + left={(iconProps: ListIconPropsType): React.Node => item.id === 0 ? ( diff --git a/src/components/Lists/PlanexGroups/GroupListItem.js b/src/components/Lists/PlanexGroups/GroupListItem.js index a3a2e89..d8f9db1 100644 --- a/src/components/Lists/PlanexGroups/GroupListItem.js +++ b/src/components/Lists/PlanexGroups/GroupListItem.js @@ -5,6 +5,7 @@ import {IconButton, List, withTheme} from 'react-native-paper'; import * as Animatable from 'react-native-animatable'; import type {CustomThemeType} from '../../../managers/ThemeManager'; import type {PlanexGroupType} from '../../../screens/Planex/GroupSelectionScreen'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { theme: CustomThemeType, @@ -61,8 +62,12 @@ class GroupListItem extends React.Component { ( - + left={(iconProps: ListIconPropsType): React.Node => ( + )} right={({size, color}: {size: number, color: string}): React.Node => ( diff --git a/src/constants/PaperStyles.js b/src/constants/PaperStyles.js new file mode 100644 index 0000000..438e075 --- /dev/null +++ b/src/constants/PaperStyles.js @@ -0,0 +1,12 @@ +// @flow + +import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; + +export type ListIconPropsType = { + color: string, + style: ViewStyleProp, +}; + +export type CardTitleIconPropsType = { + size: number, +}; diff --git a/src/screens/About/AboutScreen.js b/src/screens/About/AboutScreen.js index be07840..b365928 100644 --- a/src/screens/About/AboutScreen.js +++ b/src/screens/About/AboutScreen.js @@ -8,6 +8,10 @@ import {StackNavigationProp} from '@react-navigation/stack'; import packageJson from '../../../package.json'; import CollapsibleFlatList from '../../components/Collapsible/CollapsibleFlatList'; import APP_LOGO from '../../../assets/android.icon.png'; +import type { + CardTitleIconPropsType, + ListIconPropsType, +} from '../../constants/PaperStyles'; type ListItemType = { onPressCallback: () => void, @@ -217,9 +221,9 @@ class AboutScreen extends React.Component { ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( @@ -246,8 +250,8 @@ class AboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -296,14 +300,10 @@ class AboutScreen extends React.Component { * @param props * @return {*} */ - static getChevronIcon({ - size, - color, - }: { - size: number, - color: string, - }): React.Node { - return ; + static getChevronIcon(props: ListIconPropsType): React.Node { + return ( + + ); } /** @@ -313,11 +313,10 @@ class AboutScreen extends React.Component { * @param props * @return {*} */ - static getItemIcon( - item: ListItemType, - {size, color}: {size: number, color: string}, - ): React.Node { - return ; + static getItemIcon(item: ListItemType, props: ListIconPropsType): React.Node { + return ( + + ); } /** @@ -326,7 +325,7 @@ class AboutScreen extends React.Component { * @returns {*} */ getCardItem = ({item}: {item: ListItemType}): React.Node => { - const getItemIcon = (props: {size: number, color: string}): React.Node => + const getItemIcon = (props: ListIconPropsType): React.Node => AboutScreen.getItemIcon(item, props); if (item.showChevron) { return ( diff --git a/src/screens/Amicale/AmicaleContactScreen.js b/src/screens/Amicale/AmicaleContactScreen.js index 6f5903a..ec29e0f 100644 --- a/src/screens/Amicale/AmicaleContactScreen.js +++ b/src/screens/Amicale/AmicaleContactScreen.js @@ -2,11 +2,15 @@ import * as React from 'react'; import {FlatList, Image, Linking, View} from 'react-native'; -import {Card, List, Text, withTheme} from 'react-native-paper'; +import {Card, List, Text, withTheme, Avatar} from 'react-native-paper'; import i18n from 'i18n-js'; import type {MaterialCommunityIconsGlyphs} from 'react-native-vector-icons/MaterialCommunityIcons'; import CollapsibleFlatList from '../../components/Collapsible/CollapsibleFlatList'; import AMICALE_LOGO from '../../../assets/amicale.png'; +import type { + CardTitleIconPropsType, + ListIconPropsType, +} from '../../constants/PaperStyles'; type DatasetItemType = { name: string, @@ -74,14 +78,12 @@ class AmicaleContactScreen extends React.Component { keyExtractor = (item: DatasetItemType): string => item.email; - getChevronIcon = ({ - size, - color, - }: { - size: number, - color: string, - }): React.Node => ( - + getChevronIcon = (iconProps: ListIconPropsType): React.Node => ( + ); getRenderItem = ({item}: {item: DatasetItemType}): React.Node => { @@ -92,8 +94,12 @@ class AmicaleContactScreen extends React.Component { ( - + left={(iconProps: ListIconPropsType): React.Node => ( + )} right={this.getChevronIcon} onPress={onPress} @@ -123,14 +129,8 @@ class AmicaleContactScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Amicale/Clubs/ClubAboutScreen.js b/src/screens/Amicale/Clubs/ClubAboutScreen.js index dfb96a1..dd675ca 100644 --- a/src/screens/Amicale/Clubs/ClubAboutScreen.js +++ b/src/screens/Amicale/Clubs/ClubAboutScreen.js @@ -2,11 +2,12 @@ import * as React from 'react'; import {Image, View} from 'react-native'; -import {Card, List, Text, withTheme} from 'react-native-paper'; +import {Card, Avatar, Text, withTheme} from 'react-native-paper'; import i18n from 'i18n-js'; import Autolink from 'react-native-autolink'; import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView'; import AMICALE_ICON from '../../../../assets/amicale.png'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; const CONTACT_LINK = 'clubs@amicale-insat.fr'; @@ -35,8 +36,8 @@ class ClubAboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Amicale/Clubs/ClubDisplayScreen.js b/src/screens/Amicale/Clubs/ClubDisplayScreen.js index d4ee95b..29559a6 100644 --- a/src/screens/Amicale/Clubs/ClubDisplayScreen.js +++ b/src/screens/Amicale/Clubs/ClubDisplayScreen.js @@ -21,6 +21,7 @@ import type {CustomThemeType} from '../../../managers/ThemeManager'; import {ERROR_TYPE} from '../../../utils/WebData'; import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView'; import type {ApiGenericDataType} from '../../../utils/WebData'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { navigation: StackNavigationProp, @@ -133,9 +134,9 @@ class ClubDisplayScreen extends React.Component { ? i18n.t('screens.clubs.managersSubtitle') : i18n.t('screens.clubs.managersUnavailable') } - left={({size}: {size: number}): React.Node => ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( { ( + left={(props: ListIconPropsType): React.Node => ( )} /> @@ -252,9 +256,9 @@ class ProfileScreen extends React.Component { ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( { ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( { ( + left={(iconProps: CardTitleIconPropsType): React.Node => ( { ? i18n.t('screens.profile.membershipPayed') : i18n.t('screens.profile.membershipNotPayed') } - left={({size}: {size: number}): React.Node => ( + left={(props: ListIconPropsType): React.Node => ( @@ -389,13 +393,17 @@ class ProfileScreen extends React.Component { this.openClubDetailsScreen(item.id); }; let description = i18n.t('screens.profile.isMember'); - let icon = ({size, color}: {size: number, color: string}): React.Node => ( - + let icon = (props: ListIconPropsType): React.Node => ( + ); if (item.is_manager) { description = i18n.t('screens.profile.isManager'); - icon = ({size}: {size: number}): React.Node => ( - + icon = (props: ListIconPropsType): React.Node => ( + ); } return ( diff --git a/src/screens/Other/FeedbackScreen.js b/src/screens/Other/FeedbackScreen.js index 7bf0662..678128a 100644 --- a/src/screens/Other/FeedbackScreen.js +++ b/src/screens/Other/FeedbackScreen.js @@ -6,6 +6,7 @@ import i18n from 'i18n-js'; import {Linking} from 'react-native'; import type {CustomThemeType} from '../../managers/ThemeManager'; import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView'; +import type {CardTitleIconPropsType} from '../../constants/PaperStyles'; type PropsType = { theme: CustomThemeType, @@ -91,14 +92,8 @@ class FeedbackScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -114,14 +109,8 @@ class FeedbackScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Other/Settings/SettingsScreen.js b/src/screens/Other/Settings/SettingsScreen.js index c0b3d2f..9f687a0 100644 --- a/src/screens/Other/Settings/SettingsScreen.js +++ b/src/screens/Other/Settings/SettingsScreen.js @@ -11,6 +11,7 @@ import ThemeManager from '../../../managers/ThemeManager'; import AsyncStorageManager from '../../../managers/AsyncStorageManager'; import CustomSlider from '../../../components/Overrides/CustomSlider'; import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; type PropsType = { navigation: StackNavigationProp, @@ -171,8 +172,8 @@ class SettingsScreen extends React.Component { ( - + left={(props: ListIconPropsType): React.Node => ( + )} right={(): React.Node => ( @@ -196,11 +197,15 @@ class SettingsScreen extends React.Component { onPress={() => { navigation.navigate(route); }} - left={({size, color}: {size: number, color: number}): React.Node => ( - + left={(props: ListIconPropsType): React.Node => ( + )} - right={({size, color}: {size: number, color: number}): React.Node => ( - + right={(props: ListIconPropsType): React.Node => ( + )} onLongPress={onLongPress} /> @@ -249,14 +254,12 @@ class SettingsScreen extends React.Component { ( - + left={(props: ListIconPropsType): React.Node => ( + )} /> {this.getStartScreenPicker()} @@ -274,14 +277,12 @@ class SettingsScreen extends React.Component { ( - + left={(props: ListIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Proxiwash/ProxiwashAboutScreen.js b/src/screens/Proxiwash/ProxiwashAboutScreen.js index 2e50765..f6a8529 100644 --- a/src/screens/Proxiwash/ProxiwashAboutScreen.js +++ b/src/screens/Proxiwash/ProxiwashAboutScreen.js @@ -3,9 +3,10 @@ import * as React from 'react'; import {Image, View} from 'react-native'; import i18n from 'i18n-js'; -import {Card, List, Paragraph, Text, Title} from 'react-native-paper'; +import {Card, Avatar, Paragraph, Text, Title} from 'react-native-paper'; import CustomTabBar from '../../components/Tabbar/CustomTabBar'; import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView'; +import type {CardTitleIconPropsType} from '../../constants/PaperStyles'; const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proxiwash.png'; @@ -35,14 +36,8 @@ export default class ProxiwashAboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -56,14 +51,8 @@ export default class ProxiwashAboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -77,14 +66,8 @@ export default class ProxiwashAboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -96,14 +79,8 @@ export default class ProxiwashAboutScreen extends React.Component { style={{margin: 5, marginBottom: CustomTabBar.TAB_BAR_HEIGHT + 20}}> ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Services/Proximo/ProximoAboutScreen.js b/src/screens/Services/Proximo/ProximoAboutScreen.js index 30be2b6..a86174d 100644 --- a/src/screens/Services/Proximo/ProximoAboutScreen.js +++ b/src/screens/Services/Proximo/ProximoAboutScreen.js @@ -3,9 +3,10 @@ import * as React from 'react'; import {Image, View} from 'react-native'; import i18n from 'i18n-js'; -import {Card, List, Paragraph, Text} from 'react-native-paper'; +import {Card, Avatar, Paragraph, Text} from 'react-native-paper'; import CustomTabBar from '../../../components/Tabbar/CustomTabBar'; import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView'; +import type {CardTitleIconPropsType} from '../../../constants/PaperStyles'; const LOGO = 'https://etud.insa-toulouse.fr/~amicale_app/images/Proximo.png'; @@ -35,14 +36,8 @@ export default class ProximoAboutScreen extends React.Component { ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> @@ -53,14 +48,8 @@ export default class ProximoAboutScreen extends React.Component { style={{margin: 5, marginBottom: CustomTabBar.TAB_BAR_HEIGHT + 20}}> ( - + left={(iconProps: CardTitleIconPropsType): React.Node => ( + )} /> diff --git a/src/screens/Services/Proximo/ProximoMainScreen.js b/src/screens/Services/Proximo/ProximoMainScreen.js index 367989b..9a9d3eb 100644 --- a/src/screens/Services/Proximo/ProximoMainScreen.js +++ b/src/screens/Services/Proximo/ProximoMainScreen.js @@ -10,6 +10,7 @@ import MaterialHeaderButtons, { } from '../../../components/Overrides/CustomHeaderButton'; import type {CustomThemeType} from '../../../managers/ThemeManager'; import type {SectionListDataType} from '../../../components/Screens/WebSectionList'; +import type {ListIconPropsType} from '../../../constants/PaperStyles'; const DATA_URL = 'https://etud.insa-toulouse.fr/~proximo/data/stock-v2.json'; const LIST_ITEM_HEIGHT = 84; @@ -199,15 +200,19 @@ class ProximoMainScreen extends React.Component { title={item.type.name} description={subtitle} onPress={onPress} - left={({size}: {size: number}): React.Node => ( + left={(props: ListIconPropsType): React.Node => ( )} - right={({size, color}: {size: number, color: string}): React.Node => ( - + right={(props: ListIconPropsType): React.Node => ( + )} style={{ height: LIST_ITEM_HEIGHT, diff --git a/src/screens/Services/ServicesScreen.js b/src/screens/Services/ServicesScreen.js index 03c9c65..c8081a5 100644 --- a/src/screens/Services/ServicesScreen.js +++ b/src/screens/Services/ServicesScreen.js @@ -118,9 +118,7 @@ class ServicesScreen extends React.Component { title={item.title} subtitle={item.subtitle} left={(): React.Node => this.getListTitleImage(item.image)} - right={({size}: {size: number}): React.Node => ( - - )} + right={(): React.Node => } />