Skip to content

Commit e87c3ab

Browse files
authored
Add props to TabView and BottomSheet (#725)
* Add iconSize prop to TabView * Add additional props to bottom sheet
1 parent c15c926 commit e87c3ab

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/core/src/components/BottomSheet/BottomSheet.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ export interface BottomSheetProps extends ScrollViewProps {
1616
topSnapPosition?: string | number;
1717
middleSnapPosition?: string | number;
1818
bottomSnapPosition?: string | number;
19-
snapPoints: (string | number)[];
19+
snapPoints?: (string | number)[];
2020
initialSnapIndex?: number;
21-
initialSnapPosition: SnapPosition;
21+
initialSnapPosition?: SnapPosition;
22+
enableOverScroll?: boolean;
23+
friction?: number;
24+
topInset?: number;
2225
showHandle?: boolean;
2326
handleColor?: string;
2427
topBorderRadius?: number;

packages/core/src/components/TabView/TabView.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from "react";
2-
import { StyleProp, ViewStyle } from "react-native";
2+
import { StyleProp, ViewStyle, TextStyle } from "react-native";
33
import {
44
TabView,
55
TabBar,
@@ -36,7 +36,8 @@ type TabViewProps = {
3636
pressColor?: string;
3737
indicatorColor?: string;
3838
tabsBackgroundColor?: string;
39-
style?: StyleProp<ViewStyle>;
39+
iconSize?: number;
40+
style?: StyleProp<ViewStyle | TextStyle>;
4041
theme: Theme;
4142
} & IconSlot;
4243

@@ -54,6 +55,7 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
5455
pressColor,
5556
indicatorColor,
5657
tabsBackgroundColor,
58+
iconSize = 16,
5759
style,
5860
theme,
5961
children: childrenProp,
@@ -118,7 +120,7 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
118120
labelStyle={textStyles}
119121
renderIcon={({ route, color }) =>
120122
route?.icon ? (
121-
<Icon name={route.icon} color={color} size={16} />
123+
<Icon name={route.icon} color={color} size={iconSize} />
122124
) : null
123125
}
124126
style={{

0 commit comments

Comments
 (0)