Skip to content

Commit 6c5f8b2

Browse files
crazyshakalakaSpring Xue
and
Spring Xue
authored
bugfix: remove TabController.TabBar defaultProps, use JavaScript default parameters instead. (#3155)
Co-authored-by: Spring Xue <[email protected]>
1 parent dfdb5f5 commit 6c5f8b2

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/components/tabController/TabBar.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ const TabBar = (props: Props) => {
142142
enableShadow,
143143
shadowStyle: propsShadowStyle,
144144
indicatorStyle,
145-
labelStyle,
146-
selectedLabelStyle,
145+
labelStyle = DEFAULT_LABEL_STYLE,
146+
selectedLabelStyle = DEFAULT_SELECTED_LABEL_STYLE,
147147
labelColor,
148148
selectedLabelColor,
149149
uppercase,
150150
iconColor,
151151
selectedIconColor,
152152
activeBackgroundColor,
153153
backgroundColor = Colors.$backgroundElevated,
154-
faderProps,
154+
faderProps = DEFAULT_FADER_PROPS,
155155
containerWidth: propsContainerWidth,
156156
centerSelected,
157-
spreadItems,
157+
spreadItems = true,
158158
indicatorInsets = Spacings.s4,
159159
indicatorWidth,
160160
containerStyle,
@@ -319,12 +319,6 @@ const TabBar = (props: Props) => {
319319
};
320320

321321
TabBar.displayName = 'TabController.TabBar';
322-
TabBar.defaultProps = {
323-
labelStyle: DEFAULT_LABEL_STYLE,
324-
selectedLabelStyle: DEFAULT_SELECTED_LABEL_STYLE,
325-
faderProps: DEFAULT_FADER_PROPS,
326-
spreadItems: true
327-
};
328322

329323
const styles = StyleSheet.create({
330324
container: {

0 commit comments

Comments
 (0)