@xsolla/xui-link 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 +34 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @xsolla/xui-link
|
|
2
|
+
|
|
3
|
+
A styled anchor component with support for disabled state, underline, and secure external link handling.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-link
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Link } from "@xsolla/xui-link";
|
|
15
|
+
|
|
16
|
+
<Link href="https://xsolla.com" target="_blank">
|
|
17
|
+
Visit Xsolla
|
|
18
|
+
</Link>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
### Link
|
|
24
|
+
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
|------|------|---------|-------------|
|
|
27
|
+
| `href` | `string` | — | URL or path for the link |
|
|
28
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | Font size variant |
|
|
29
|
+
| `disabled` | `boolean` | `false` | Prevents navigation and applies disabled styling |
|
|
30
|
+
| `underline` | `boolean` | `false` | Adds text underline decoration |
|
|
31
|
+
| `onClick` | `() => void` | — | Click handler; prevents default navigation when provided |
|
|
32
|
+
| `target` | `string` | — | Anchor `target` attribute (e.g. `"_blank"`) |
|
|
33
|
+
| `rel` | `string` | — | Anchor `rel` attribute; `noopener noreferrer` is merged automatically for `target="_blank"` |
|
|
34
|
+
| `color` | `string` | — | Overrides the default link colour |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-link",
|
|
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"
|