spry-apps-dropdown 2.0.2 → 2.0.3
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 +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ A React component library for displaying Spry apps dropdown and profile menu wit
|
|
|
11
11
|
- 📱 Responsive layout
|
|
12
12
|
- 🎯 TypeScript support
|
|
13
13
|
- 🔌 Easy integration
|
|
14
|
-
- 👤 Profile menu with avatar, account management, and sign out
|
|
14
|
+
- 👤 Profile menu with avatar, account management, and sign out (always shows Manage your Account)
|
|
15
15
|
- 🎛️ Combined TopBar component with both apps dropdown and profile menu
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
@@ -177,12 +177,20 @@ Profile menu component with automatic API integration.
|
|
|
177
177
|
|------|------|----------|---------|-------------|
|
|
178
178
|
| `apiUrl` | `string` | Yes | - | Base URL for profile API |
|
|
179
179
|
| `onSignOut` | `() => void` | No | - | Callback when user signs out |
|
|
180
|
-
| `onManageAccount` | `() => void` | No | - | Callback for
|
|
180
|
+
| `onManageAccount` | `() => void` | No | - | Callback for Manage your Account button. If not provided, it redirects to `https://sprylogin.com/my-account/` |
|
|
181
181
|
| `getAuthToken` | `() => string \| null \| Promise<string \| null>` | No | - | Function to get auth token |
|
|
182
182
|
| `headers` | `Record<string, string>` | No | - | Custom headers for API requests |
|
|
183
183
|
| `refetchInterval` | `number` | No | `300000` (5 min) | Auto-refetch interval in ms |
|
|
184
184
|
| `cacheTime` | `number` | No | `300000` (5 min) | Cache duration in ms |
|
|
185
185
|
|
|
186
|
+
### Manage Account behavior
|
|
187
|
+
|
|
188
|
+
The Manage your Account button is always shown. It uses this order:
|
|
189
|
+
|
|
190
|
+
1. `onManageAccount` callback (if provided)
|
|
191
|
+
2. `profile.manageAccountUrl` (if present)
|
|
192
|
+
3. Default: `https://sprylogin.com/my-account/`
|
|
193
|
+
|
|
186
194
|
### `AppsDropdownConnected`
|
|
187
195
|
|
|
188
196
|
The main component with automatic API integration.
|
package/package.json
CHANGED