@momo-kits/foundation 0.169.12-beta.4 → 0.169.12-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,7 +162,11 @@ const LegacyBottomTab = ({
162
162
  title: item.label,
163
163
  tabBarStyle: styles.tab,
164
164
  tabBarBadge: badgeLabel,
165
- tabBarBadgeStyle: [styles.badge, badgeStyle],
165
+ tabBarBadgeStyle: [
166
+ styles.badge,
167
+ { fontFamily: exportFontFamily('bold') },
168
+ badgeStyle,
169
+ ],
166
170
  tabBarIcon: ({ color }) => (
167
171
  <Icon source={item.icon} color={color} size={TAB_ICON_SIZE} />
168
172
  ),
@@ -187,7 +191,6 @@ const styles = StyleSheet.create({
187
191
  lineHeight: BADGE_LINE_HEIGHT,
188
192
  fontWeight: 'bold',
189
193
  alignSelf: 'center',
190
- fontFamily: exportFontFamily('bold'),
191
194
  },
192
195
  });
193
196
 
@@ -9,7 +9,7 @@ import { type BottomTabNavigationOptions } from '@react-navigation/bottom-tabs';
9
9
  import { type Route } from '@react-navigation/native';
10
10
  import { Text } from '../../Text';
11
11
  import { MiniAppContext } from '../../Context';
12
- import { Colors } from '../../Consts';
12
+ import { Colors, Spacing } from '../../Consts';
13
13
  import { LegacyTabBarIcon } from './LegacyTabBarIcon';
14
14
 
15
15
  type LabelType = NonNullable<BottomTabNavigationOptions['tabBarLabel']>;
@@ -99,8 +99,8 @@ const styles = StyleSheet.create({
99
99
  container: {
100
100
  flex: 1,
101
101
  alignItems: 'center',
102
- // no vertical padding: icon + label stay centered in the 64 bar without the label's bottom cut
103
102
  justifyContent: 'center',
103
+ paddingVertical: Spacing.S,
104
104
  bottom: -2,
105
105
  },
106
106
  debugBaseLine: { borderWidth: 1, borderColor: Colors.green_06 },
@@ -197,7 +197,8 @@ const FloatingBottomTab: React.FC<BottomTabProps> = ({
197
197
  */
198
198
  const BottomTab: React.FC<BottomTabProps> = props => {
199
199
  const { isIPhoneDuo } = useScreenLayout();
200
- if (props.useLegacy && !isIPhoneDuo) {
200
+ // legacy unless told otherwise: the redesigned bar is not rolled out yet
201
+ if ((props.useLegacy ?? true) && !isIPhoneDuo) {
201
202
  return <LegacyBottomTab {...props} />;
202
203
  }
203
204
  return <FloatingBottomTab {...props} />;
@@ -35,7 +35,8 @@ export type BottomTabProps = {
35
35
  compressionBehavior?: 'toolbar' | 'tabBar';
36
36
  /**
37
37
  * Renders the pre-redesign docked phone bar instead of the floating one. Ignores
38
- * `showDot`, `floatingButton.labelContent` and `compressionBehavior`; not on iPhone Duo. Defaults to false.
38
+ * `showDot`, `floatingButton.labelContent` and `compressionBehavior`; not on iPhone Duo.
39
+ * Defaults to true until the redesign rolls out; pass false for the floating bar.
39
40
  */
40
41
  useLegacy?: boolean;
41
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.169.12-beta.4",
3
+ "version": "0.169.12-beta.6",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},