From 35a7caf0b90477f9db4a8e20a032ce5afd63abfb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 24 Aug 2018 15:13:47 -0700 Subject: [PATCH] Use StyleProp for style properties --- types/react-native-sortable-list/index.d.ts | 8 ++++---- types/react-native-swiper/index.d.ts | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/types/react-native-sortable-list/index.d.ts b/types/react-native-sortable-list/index.d.ts index 65b34ce62f..ac449da6d4 100755 --- a/types/react-native-sortable-list/index.d.ts +++ b/types/react-native-sortable-list/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.8 import * as React from 'react'; -import { ViewStyle } from 'react-native'; +import { StyleProp, ViewStyle } from 'react-native'; type DataKey = string | number; @@ -44,17 +44,17 @@ interface SortableListProps { /** * style of HOC */ - style?: ViewStyle + style?: StyleProp /** * these styles will be applied to the inner scroll view content container */ - contentContainerStyle?: ViewStyle + contentContainerStyle?: StyleProp /** * these styles will be applied to the inner scroll view content container, excluding the header and footer */ - innerContainerStyle?: ViewStyle + innerContainerStyle?: StyleProp /** * when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column. diff --git a/types/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts index a201bcd00b..8a6555f787 100644 --- a/types/react-native-swiper/index.d.ts +++ b/types/react-native-swiper/index.d.ts @@ -9,6 +9,7 @@ import * as React from 'react'; import { ViewStyle, + StyleProp, NativeSyntheticEvent, NativeScrollEvent, } from 'react-native'; @@ -31,7 +32,7 @@ export interface SwiperState { export interface SwiperProperties extends React.Props { horizontal?: boolean; - style?: ViewStyle; + style?: StyleProp; pagingEnabled?: boolean; @@ -71,9 +72,9 @@ export interface SwiperProperties extends React.Props { renderPagination?(index: number, total: number, thisObject: Swiper): JSX.Element; - dotStyle?: ViewStyle; + dotStyle?: StyleProp; - activeDotStyle?: ViewStyle; + activeDotStyle?: StyleProp; activeDot?: JSX.Element; @@ -87,9 +88,9 @@ export interface SwiperProperties extends React.Props { width?: number; - paginationStyle?: ViewStyle; + paginationStyle?: StyleProp; - buttonWrapperStyle?: ViewStyle; + buttonWrapperStyle?: StyleProp; nextButton?: JSX.Element;