chore: fix types on ContactList example

This commit is contained in:
Mo Gorhom
2020-12-22 14:55:45 +01:00
parent 4af7d5c02b
commit ebfad4c52d

View File

@@ -1,5 +1,12 @@
import React, { useMemo, useCallback } from 'react';
import { StyleSheet, Text, Platform, View, ViewStyle } from 'react-native';
import {
StyleSheet,
Text,
Platform,
View,
ViewStyle,
StyleProp,
} from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useFocusEffect } from '@react-navigation/native';
import {
@@ -17,7 +24,7 @@ import ContactItem from '../contactItem';
export interface ContactListProps {
type: 'FlatList' | 'SectionList' | 'ScrollView' | 'View';
count?: number;
style?: ViewStyle;
style?: StyleProp<ViewStyle>;
header?: (() => JSX.Element) | null;
onItemPress?: () => void;
}
@@ -43,6 +50,7 @@ const ContactList = ({
const contentContainerStyle = useMemo(
() => ({
...styles.contentContainer,
// @ts-ignore
...style,
paddingBottom: bottomSafeArea,
}),