Skip to content

Commit

Permalink
feat: 为TabBar添加默认样式
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaaoo committed Dec 5, 2024
1 parent f63464b commit ea379d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/TabBar/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const TabBar = forwardRef<TabBarRef, TabBarProps>((props, ref) => {
});

return (
<View style={[{ height: 55 }, style]} onLayout={handleLayout}>
<View style={[styles.tabBarDefaultStyle, style]} onLayout={handleLayout}>
<ScrollView
ref={scrollRef}
horizontal
Expand Down Expand Up @@ -203,6 +203,11 @@ const TabBar = forwardRef<TabBarRef, TabBarProps>((props, ref) => {
TabBar.displayName = 'TabBar';

const styles = StyleSheet.create({
tabBarDefaultStyle: {
height: 55,
borderBottomColor: '#eee',
borderBottomWidth: 1,
},
sliderContainer: {
position: 'absolute',
left: 0,
Expand Down

0 comments on commit ea379d8

Please sign in to comment.