@xsolla/xui-nav-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.
- package/README.md +48 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @xsolla/xui-nav-bar
|
|
2
|
+
|
|
3
|
+
Top navigation bar with start, centre, and end slots for building app headers.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-nav-bar
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { NavBar } from '@xsolla/xui-nav-bar';
|
|
15
|
+
|
|
16
|
+
function MyHeader() {
|
|
17
|
+
return (
|
|
18
|
+
<NavBar bordered size="md">
|
|
19
|
+
<NavBar.StartSlot>
|
|
20
|
+
<BackButton />
|
|
21
|
+
</NavBar.StartSlot>
|
|
22
|
+
<NavBar.Center>
|
|
23
|
+
<Text>Page Title</Text>
|
|
24
|
+
</NavBar.Center>
|
|
25
|
+
<NavBar.EndSlot>
|
|
26
|
+
<SettingsButton />
|
|
27
|
+
</NavBar.EndSlot>
|
|
28
|
+
</NavBar>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Components
|
|
34
|
+
|
|
35
|
+
- **NavBar** — Full-width header bar container
|
|
36
|
+
- **NavBar.StartSlot** — Left-aligned slot
|
|
37
|
+
- **NavBar.Center** — Centre-aligned slot
|
|
38
|
+
- **NavBar.EndSlot** — Right-aligned slot
|
|
39
|
+
|
|
40
|
+
## Props
|
|
41
|
+
|
|
42
|
+
### NavBar
|
|
43
|
+
|
|
44
|
+
| Prop | Type | Default | Description |
|
|
45
|
+
|------|------|---------|-------------|
|
|
46
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Height variant (48 / 64 / 80px) |
|
|
47
|
+
| `bordered` | `boolean` | `false` | Show bottom border |
|
|
48
|
+
| `backgroundColor` | `string` | — | Custom background colour |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-nav-bar",
|
|
3
|
-
"version": "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",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-core": "0.
|
|
14
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.97.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.97.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=16.8.0"
|