@xsolla/xui-breadcrumbs 0.95.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 +37 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @xsolla/xui-breadcrumbs
|
|
2
|
+
|
|
3
|
+
Accessible breadcrumb navigation trail with customisable separator and size variants.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-breadcrumbs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Breadcrumbs } from '@xsolla/xui-breadcrumbs';
|
|
15
|
+
|
|
16
|
+
const items = [
|
|
17
|
+
{ label: 'Home', href: '/' },
|
|
18
|
+
{ label: 'Products', href: '/products' },
|
|
19
|
+
{ label: 'Detail' },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
function MyComponent() {
|
|
23
|
+
return <Breadcrumbs items={items} size="md" />;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
### Breadcrumbs
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Default | Description |
|
|
32
|
+
|------|------|---------|-------------|
|
|
33
|
+
| `items` | `BreadcrumbItem[]` | — | Ordered list of breadcrumb items |
|
|
34
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Font and icon size variant |
|
|
35
|
+
| `stretched` | `boolean` | `false` | Stretch to fill container width |
|
|
36
|
+
| `separator` | `ReactNode` | — | Custom separator; defaults to chevron right |
|
|
37
|
+
| `backgroundColor` | `string` | — | Custom background colour |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-breadcrumbs",
|
|
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"
|