Skip to content

Commit 8d2d0a4

Browse files
Merge pull request #150 from yicru/#145-shared_props_type
Fix wrong type definition in TabsSharedProps closes #145
2 parents d741491 + f414caa commit 8d2d0a4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Below are examples of those components and description of the props they are acc
106106
| `rememberTabScrollPosition` |`bool` | Yes |`false` | When switching between tabs remember current scroll position |
107107
| `scrollEvent` |`func` | Yes | | Scroll event to apply custom animations |
108108
| `tabs` |`{ content: ReactElement;title?: string;icon?: ReactElement` &#124; `(isActive: boolean) => ReactElement);` | Yes | `[{title: 'Popular',content: <RenderContent title="Popular Quizes" />},...]` | Array with tabs names, icons and content |
109-
| `tabText` |`Text.propTypes.style` | Yes |`{fontSize: 16, lineHeight: 20, paddingHorizontal: 12, paddingVertical: 8, color: colors.white}` | Set inactive tab style |
109+
| `tabTextStyle` |`Text.propTypes.style` | Yes |`{fontSize: 16, lineHeight: 20, paddingHorizontal: 12, paddingVertical: 8, color: colors.white}` | Set inactive tab style |
110110
| `tabTextActiveStyle` |`Text.propTypes.style` | Yes |`{fontSize: 16, lineHeight: 20, paddingHorizontal: 12, paddingVertical: 8, color: colors.white}` | Set active tab stylee |
111111
| `tabTextContainerStyle` |`ViewPropTypes.style` | Yes |`{backgroundColor: colors.transparent, borderRadius: 18}` | Set inactive tab container style |
112112
| `tabTextContainerActiveStyle` |`ViewPropTypes.style` | Yes |`{backgroundColor: colors.darkMint}` | Set active tab container style |

src/index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ export interface IconProps {
4848
}
4949

5050
export interface TabsSharedProps {
51-
tabTextActiveStyle: TextStyle;
52-
tabTextContainerActiveStyle: ViewStyle;
53-
tabTextContainerStyle: ViewStyle;
54-
tabTextStyle: TextStyle;
55-
tabWrapperStyle: ViewStyle;
56-
tabs: Tab[];
57-
tabsContainerStyle: ViewStyle;
51+
tabTextActiveStyle?: TextStyle;
52+
tabTextContainerActiveStyle?: ViewStyle;
53+
tabTextContainerStyle?: ViewStyle;
54+
tabTextStyle?: TextStyle;
55+
tabWrapperStyle?: ViewStyle;
56+
tabs?: Tab[];
57+
tabsContainerStyle?: ViewStyle;
5858
}
5959

6060
export type TabbedHeaderProps = SharedProps &

0 commit comments

Comments
 (0)