@xsolla/xui-tab-bar 0.96.0 → 0.97.0

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.
Files changed (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @xsolla/xui-tab-bar
2
+
3
+ React Navigation-compatible bottom tab bar with icon, label, and badge support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-tab-bar
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { TabBar } from '@xsolla/xui-tab-bar';
15
+ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
16
+
17
+ const Tab = createBottomTabNavigator();
18
+
19
+ function MyTabs() {
20
+ return (
21
+ <Tab.Navigator tabBar={(props) => <TabBar {...props} />}>
22
+ <Tab.Screen
23
+ name="Home"
24
+ component={HomeScreen}
25
+ options={{
26
+ tabBarIcon: ({ color, size }) => <HomeIcon color={color} size={size} />,
27
+ tabBarBadge: 3,
28
+ }}
29
+ />
30
+ <Tab.Screen name="Settings" component={SettingsScreen} />
31
+ </Tab.Navigator>
32
+ );
33
+ }
34
+ ```
35
+
36
+ ## Props
37
+
38
+ ### TabBar
39
+
40
+ | Prop | Type | Default | Description |
41
+ |------|------|---------|-------------|
42
+ | `state` | `object` | — | React Navigation tab state |
43
+ | `descriptors` | `object` | — | React Navigation route descriptors |
44
+ | `navigation` | `object` | — | React Navigation navigation object |
45
+ | `labelPosition` | `'below-icon' \| 'beside-icon'` | `'below-icon'` | Position of label relative to icon |
46
+ | `backgroundColor` | `string` | — | Custom background colour |
47
+ | `activateOnFocus` | `boolean` | `true` | Auto-navigate on arrow key focus |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-tab-bar",
3
- "version": "0.96.0",
3
+ "version": "0.97.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,9 +13,9 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-badge": "0.96.0",
17
- "@xsolla/xui-core": "0.96.0",
18
- "@xsolla/xui-primitives-core": "0.96.0"
16
+ "@xsolla/xui-badge": "0.97.0",
17
+ "@xsolla/xui-core": "0.97.0",
18
+ "@xsolla/xui-primitives-core": "0.97.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0"