Use StyleProp for style properties

This commit is contained in:
Nathan Shively-Sanders 2018-08-24 15:13:47 -07:00
parent 2f2fbf30c9
commit 35a7caf0b9
2 changed files with 10 additions and 9 deletions

View File

@ -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<ViewStyle>
/**
* these styles will be applied to the inner scroll view content container
*/
contentContainerStyle?: ViewStyle
contentContainerStyle?: StyleProp<ViewStyle>
/**
* these styles will be applied to the inner scroll view content container, excluding the header and footer
*/
innerContainerStyle?: ViewStyle
innerContainerStyle?: StyleProp<ViewStyle>
/**
* when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column.

View File

@ -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<Swiper> {
horizontal?: boolean;
style?: ViewStyle;
style?: StyleProp<ViewStyle>;
pagingEnabled?: boolean;
@ -71,9 +72,9 @@ export interface SwiperProperties extends React.Props<Swiper> {
renderPagination?(index: number, total: number, thisObject: Swiper): JSX.Element;
dotStyle?: ViewStyle;
dotStyle?: StyleProp<ViewStyle>;
activeDotStyle?: ViewStyle;
activeDotStyle?: StyleProp<ViewStyle>;
activeDot?: JSX.Element;
@ -87,9 +88,9 @@ export interface SwiperProperties extends React.Props<Swiper> {
width?: number;
paginationStyle?: ViewStyle;
paginationStyle?: StyleProp<ViewStyle>;
buttonWrapperStyle?: ViewStyle;
buttonWrapperStyle?: StyleProp<ViewStyle>;
nextButton?: JSX.Element;