From 8b375da0fe1204eac2977abe475fd4d4d208494e Mon Sep 17 00:00:00 2001 From: maroon <925074169@qq.com> Date: Wed, 21 Aug 2019 02:43:35 +0800 Subject: [PATCH] react-native-scrollable-tab-view DefaultTabBarProps style (#37551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * react-native-scrollable-tab-view DefaultTabBarProps missing style * 【react-native-scrollable-tab-view】DefaultTabBar component modify style would be simpler --- .../index.d.ts | 15 ++++++++------- .../react-native-scrollable-tab-view-tests.tsx | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index b35e6fe716..2a6d8c5f13 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -130,13 +130,14 @@ export type TabProps = T & { }; export interface DefaultTabBarProps { - backgroundColor?: string; - activeTextColor?: string; - inactiveTextColor?: string; - textStyle?: TextStyle; - tabStyle?: ViewStyle; - renderTab?: RenderTabProperties; - underlineStyle?: ViewStyle; + backgroundColor?: string; + activeTextColor?: string; + inactiveTextColor?: string; + textStyle?: TextStyle; + tabStyle?: ViewStyle; + renderTab?: RenderTabProperties; + underlineStyle?: ViewStyle; + style?: ViewStyle; } export type RenderTabProperties = diff --git a/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx b/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx index 3c5aecc379..6a13aae6a8 100644 --- a/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx +++ b/types/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Text, TextStyle, View, ViewStyle } from 'react-native'; -import ScrollableTabView, { ScrollableTabBar, TabProps } from 'react-native-scrollable-tab-view'; +import ScrollableTabView, { ScrollableTabBar, TabProps, DefaultTabBar } from 'react-native-scrollable-tab-view'; interface MyTextProps { style?: TextStyle; @@ -35,3 +35,19 @@ const TabView1 = () => ( project ); + +const DefaultTabBarView2 = () => ( + } + > + My + favorite + project + favorite + project + +);