@lobehub/icons-rn 1.4.0 → 1.4.2
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 +16 -37
- package/dist/esm/index.js +169 -180
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +770 -770
- package/dist/index.d.ts +770 -770
- package/dist/index.js +9 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -58,17 +58,17 @@ pnpm add react-native-svg
|
|
|
58
58
|
|
|
59
59
|
#### Optional: Gradient Support
|
|
60
60
|
|
|
61
|
-
For gradient background support in Avatar components, install `
|
|
61
|
+
For gradient background support in Avatar components, install `expo-linear-gradient`:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npm install
|
|
64
|
+
npm install expo-linear-gradient
|
|
65
65
|
# or
|
|
66
|
-
yarn add
|
|
66
|
+
yarn add expo-linear-gradient
|
|
67
67
|
# or
|
|
68
|
-
pnpm add
|
|
68
|
+
pnpm add expo-linear-gradient
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
> 💡 **Note**: If `
|
|
71
|
+
> 💡 **Note**: If `expo-linear-gradient` is not installed, gradient backgrounds will automatically fallback to solid colors.
|
|
72
72
|
|
|
73
73
|
## 📖 Usage
|
|
74
74
|
|
|
@@ -152,17 +152,11 @@ import { Adobe } from '@lobehub/icons-rn';
|
|
|
152
152
|
export default function App() {
|
|
153
153
|
return (
|
|
154
154
|
<View style={styles.container}>
|
|
155
|
-
{/* CSS gradient format - requires
|
|
156
|
-
<Adobe.Avatar
|
|
157
|
-
|
|
158
|
-
background="linear-gradient(45deg, #9AD8F8, #3D8FFF, #6350FB)"
|
|
159
|
-
/>
|
|
160
|
-
|
|
155
|
+
{/* CSS gradient format - requires expo-linear-gradient */}
|
|
156
|
+
<Adobe.Avatar size={48} background="linear-gradient(45deg, #9AD8F8, #3D8FFF, #6350FB)" />
|
|
157
|
+
|
|
161
158
|
{/* Automatic fallback to solid color if gradient library not available */}
|
|
162
|
-
<Adobe.Avatar
|
|
163
|
-
size={48}
|
|
164
|
-
background="linear-gradient(to right, #FF6B35, #F7931E)"
|
|
165
|
-
/>
|
|
159
|
+
<Adobe.Avatar size={48} background="linear-gradient(to right, #FF6B35, #F7931E)" />
|
|
166
160
|
</View>
|
|
167
161
|
);
|
|
168
162
|
}
|
|
@@ -194,12 +188,12 @@ export default function App() {
|
|
|
194
188
|
|
|
195
189
|
### Avatar Props
|
|
196
190
|
|
|
197
|
-
| Prop | Type | Default | Description
|
|
198
|
-
| -------------- | -------- | ----------- |
|
|
199
|
-
| `size` | `number` | `24` | Avatar size in pixels
|
|
200
|
-
| `background` | `string` | Brand color | Background color or CSS gradient (e.g., `linear-gradient(...)`)
|
|
201
|
-
| `color` | `string` | `#FFFFFF` | Icon color
|
|
202
|
-
| `iconMultiple` | `number` | `0.6` | Icon size multiplier
|
|
191
|
+
| Prop | Type | Default | Description |
|
|
192
|
+
| -------------- | -------- | ----------- | --------------------------------------------------------------- |
|
|
193
|
+
| `size` | `number` | `24` | Avatar size in pixels |
|
|
194
|
+
| `background` | `string` | Brand color | Background color or CSS gradient (e.g., `linear-gradient(...)`) |
|
|
195
|
+
| `color` | `string` | `#FFFFFF` | Icon color |
|
|
196
|
+
| `iconMultiple` | `number` | `0.6` | Icon size multiplier |
|
|
203
197
|
|
|
204
198
|
### Text Props
|
|
205
199
|
|
|
@@ -243,7 +237,7 @@ Avatar components support CSS `linear-gradient` format for rich visual effects:
|
|
|
243
237
|
<Adobe.Avatar background="linear-gradient(to right, #FF6B35, #F7931E)" />
|
|
244
238
|
<Adobe.Avatar background="linear-gradient(to bottom, #667eea, #764ba2)" />
|
|
245
239
|
|
|
246
|
-
// Degree angles
|
|
240
|
+
// Degree angles
|
|
247
241
|
<Adobe.Avatar background="linear-gradient(45deg, #9AD8F8, #3D8FFF, #6350FB)" />
|
|
248
242
|
<Adobe.Avatar background="linear-gradient(135deg, #667eea, #764ba2)" />
|
|
249
243
|
|
|
@@ -251,21 +245,6 @@ Avatar components support CSS `linear-gradient` format for rich visual effects:
|
|
|
251
245
|
<Adobe.Avatar background="linear-gradient(90deg, #FF6B35 0%, #F7931E 50%, #C02425 100%)" />
|
|
252
246
|
```
|
|
253
247
|
|
|
254
|
-
### Automatic Fallback
|
|
255
|
-
|
|
256
|
-
If `react-native-linear-gradient` is not installed or gradient parsing fails:
|
|
257
|
-
|
|
258
|
-
- **Extracts first color** from gradient as solid background
|
|
259
|
-
- **Graceful degradation** - no crashes or broken UI
|
|
260
|
-
- **Development-friendly** - works without additional setup
|
|
261
|
-
|
|
262
|
-
Example fallback behavior:
|
|
263
|
-
```tsx
|
|
264
|
-
// With library: Shows beautiful gradient
|
|
265
|
-
// Without library: Shows solid #9AD8F8 background
|
|
266
|
-
<Adobe.Avatar background="linear-gradient(45deg, #9AD8F8, #3D8FFF, #6350FB)" />
|
|
267
|
-
```
|
|
268
|
-
|
|
269
248
|
## 📦 Available Icons
|
|
270
249
|
|
|
271
250
|
This package includes **225+ AI/LLM brand icons** across three main categories:
|