@xsolla/xui-logos-xsolla 0.141.0 → 0.141.1
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/package.json +1 -1
- package/README.md +0 -255
package/package.json
CHANGED
package/README.md
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
# Logos Xsolla
|
|
2
|
-
|
|
3
|
-
A cross-platform React component for displaying the official Xsolla logo with support for full logo (icon + text), text-only, and icon-only variants in multiple color options.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @xsolla/xui-logos-xsolla
|
|
9
|
-
# or
|
|
10
|
-
yarn add @xsolla/xui-logos-xsolla
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Demo
|
|
14
|
-
|
|
15
|
-
### Full Logo
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import * as React from 'react';
|
|
19
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
20
|
-
|
|
21
|
-
export default function FullLogo() {
|
|
22
|
-
return (
|
|
23
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
24
|
-
<Xsolla variant="full" color="brand" />
|
|
25
|
-
<Xsolla variant="full" color="black" />
|
|
26
|
-
<Xsolla variant="full" color="white" />
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Text Only
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import * as React from 'react';
|
|
36
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
37
|
-
|
|
38
|
-
export default function TextOnly() {
|
|
39
|
-
return (
|
|
40
|
-
<div style={{ display: 'flex', gap: 16 }}>
|
|
41
|
-
<Xsolla variant="text" color="brand" />
|
|
42
|
-
<Xsolla variant="text" color="black" />
|
|
43
|
-
<Xsolla variant="text" color="white" />
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Icon Only
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
import * as React from 'react';
|
|
53
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
54
|
-
|
|
55
|
-
export default function IconOnly() {
|
|
56
|
-
return (
|
|
57
|
-
<div style={{ display: 'flex', gap: 16 }}>
|
|
58
|
-
<Xsolla variant="icon" color="brand" />
|
|
59
|
-
<Xsolla variant="icon" color="black" />
|
|
60
|
-
<Xsolla variant="icon" color="white" />
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Different Sizes
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import * as React from 'react';
|
|
70
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
71
|
-
|
|
72
|
-
export default function Sizes() {
|
|
73
|
-
return (
|
|
74
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
|
|
75
|
-
<Xsolla size="xs" />
|
|
76
|
-
<Xsolla size="sm" />
|
|
77
|
-
<Xsolla size="md" />
|
|
78
|
-
<Xsolla size={48} />
|
|
79
|
-
</div>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Anatomy
|
|
85
|
-
|
|
86
|
-
```jsx
|
|
87
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
88
|
-
|
|
89
|
-
<Xsolla
|
|
90
|
-
variant="full" // full, text, or icon
|
|
91
|
-
color="brand" // brand, black, or white
|
|
92
|
-
size="sm" // xs, sm, md, or custom number
|
|
93
|
-
className="logo" // CSS class
|
|
94
|
-
style={{ margin: 8 }} // Inline styles
|
|
95
|
-
aria-label="Xsolla" // Accessible label
|
|
96
|
-
/>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Examples
|
|
100
|
-
|
|
101
|
-
### Header Logo
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
import * as React from 'react';
|
|
105
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
106
|
-
|
|
107
|
-
export default function HeaderLogo() {
|
|
108
|
-
return (
|
|
109
|
-
<header style={{
|
|
110
|
-
display: 'flex',
|
|
111
|
-
alignItems: 'center',
|
|
112
|
-
padding: '16px 24px',
|
|
113
|
-
background: '#1a1a1a',
|
|
114
|
-
}}>
|
|
115
|
-
<a href="/" aria-label="Xsolla Home">
|
|
116
|
-
<Xsolla variant="full" color="brand" size="md" />
|
|
117
|
-
</a>
|
|
118
|
-
</header>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Footer Logo
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
import * as React from 'react';
|
|
127
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
128
|
-
|
|
129
|
-
export default function FooterLogo() {
|
|
130
|
-
return (
|
|
131
|
-
<footer style={{
|
|
132
|
-
padding: 24,
|
|
133
|
-
background: '#f5f5f5',
|
|
134
|
-
textAlign: 'center',
|
|
135
|
-
}}>
|
|
136
|
-
<Xsolla variant="full" color="black" size="sm" />
|
|
137
|
-
<p style={{ marginTop: 8, fontSize: 12, color: '#666' }}>
|
|
138
|
-
Powered by Xsolla
|
|
139
|
-
</p>
|
|
140
|
-
</footer>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Favicon/App Icon
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
import * as React from 'react';
|
|
149
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
150
|
-
|
|
151
|
-
export default function AppIcon() {
|
|
152
|
-
return (
|
|
153
|
-
<div style={{
|
|
154
|
-
width: 48,
|
|
155
|
-
height: 48,
|
|
156
|
-
background: '#1a1a1a',
|
|
157
|
-
borderRadius: 8,
|
|
158
|
-
display: 'flex',
|
|
159
|
-
alignItems: 'center',
|
|
160
|
-
justifyContent: 'center',
|
|
161
|
-
}}>
|
|
162
|
-
<Xsolla variant="icon" color="brand" size="md" />
|
|
163
|
-
</div>
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Responsive Logo
|
|
169
|
-
|
|
170
|
-
```tsx
|
|
171
|
-
import * as React from 'react';
|
|
172
|
-
import { Xsolla } from '@xsolla/xui-logos-xsolla';
|
|
173
|
-
|
|
174
|
-
export default function ResponsiveLogo() {
|
|
175
|
-
const [width, setWidth] = React.useState(window.innerWidth);
|
|
176
|
-
|
|
177
|
-
React.useEffect(() => {
|
|
178
|
-
const handleResize = () => setWidth(window.innerWidth);
|
|
179
|
-
window.addEventListener('resize', handleResize);
|
|
180
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
181
|
-
}, []);
|
|
182
|
-
|
|
183
|
-
const getVariant = () => {
|
|
184
|
-
if (width < 480) return 'icon';
|
|
185
|
-
if (width < 768) return 'text';
|
|
186
|
-
return 'full';
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<Xsolla
|
|
191
|
-
variant={getVariant()}
|
|
192
|
-
color="brand"
|
|
193
|
-
size="md"
|
|
194
|
-
/>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
## API Reference
|
|
200
|
-
|
|
201
|
-
### Xsolla
|
|
202
|
-
|
|
203
|
-
**XsollaLogoProps:**
|
|
204
|
-
|
|
205
|
-
| Prop | Type | Default | Description |
|
|
206
|
-
| :--- | :--- | :------ | :---------- |
|
|
207
|
-
| variant | `"full" \| "text" \| "icon"` | `"full"` | Logo variant: full (icon + text), text only, or icon only. |
|
|
208
|
-
| color | `"brand" \| "black" \| "white"` | `"brand"` | Logo color. |
|
|
209
|
-
| size | `"xs" \| "sm" \| "md" \| number` | `"sm"` | Size preset or custom height in pixels. |
|
|
210
|
-
| className | `string` | - | CSS class name. |
|
|
211
|
-
| style | `CSSProperties` | - | Inline styles. |
|
|
212
|
-
| data-testid | `string` | - | Test ID (web). |
|
|
213
|
-
| aria-label | `string` | - | Accessible label. |
|
|
214
|
-
| aria-hidden | `boolean` | - | Hide from screen readers. |
|
|
215
|
-
| accessibilityLabel | `string` | - | React Native accessibility label. |
|
|
216
|
-
|
|
217
|
-
## Size Presets
|
|
218
|
-
|
|
219
|
-
| Preset | Height |
|
|
220
|
-
| :----- | :----- |
|
|
221
|
-
| `xs` | 18px |
|
|
222
|
-
| `sm` | 24px |
|
|
223
|
-
| `md` | 32px |
|
|
224
|
-
|
|
225
|
-
## Color Values
|
|
226
|
-
|
|
227
|
-
| Color | Hex Code |
|
|
228
|
-
| :---- | :------- |
|
|
229
|
-
| `brand` | #80EAFF |
|
|
230
|
-
| `black` | #000000 |
|
|
231
|
-
| `white` | #FFFFFF |
|
|
232
|
-
|
|
233
|
-
## Variants
|
|
234
|
-
|
|
235
|
-
The component supports three variants:
|
|
236
|
-
|
|
237
|
-
- **full** - Complete logo with icon and "XSOLLA" text (default)
|
|
238
|
-
- **text** - Text-only "XSOLLA" without the icon (useful for tight spaces or text-heavy layouts)
|
|
239
|
-
- **icon** - Icon only, the distinctive Xsolla "X" symbol (useful for small spaces like favicons or compact headers)
|
|
240
|
-
|
|
241
|
-
## Brand Guidelines
|
|
242
|
-
|
|
243
|
-
- Use the `brand` color (cyan) on dark backgrounds for best visibility
|
|
244
|
-
- Use `black` on light backgrounds
|
|
245
|
-
- Use `white` on colored or dark photo backgrounds
|
|
246
|
-
- Use the `text` variant when you need the wordmark without the icon
|
|
247
|
-
- Use the `icon` variant for compact spaces where the full logo won't fit
|
|
248
|
-
- Maintain clear space around the logo equal to the height of the "X" icon
|
|
249
|
-
- Don't stretch, distort, or apply effects to the logo
|
|
250
|
-
|
|
251
|
-
## Accessibility
|
|
252
|
-
|
|
253
|
-
- When used as a link, wrap in an anchor tag with `aria-label`
|
|
254
|
-
- For decorative logos, use `aria-hidden="true"`
|
|
255
|
-
- The logo has appropriate contrast ratios for each color variant
|