@metricshift/react 1.3.0 → 1.4.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 +23 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,26 +217,29 @@ Instead of treating feedback as something you “look at later”, callbacks let
|
|
|
217
217
|
|
|
218
218
|
Act on feedback at the moment intent happens.
|
|
219
219
|
|
|
220
|
-
🧩 Props
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
220
|
+
## 🧩 Props
|
|
221
|
+
|
|
222
|
+
| Prop | Type | Default | Description |
|
|
223
|
+
| --- | --- | --- | --- |
|
|
224
|
+
| `projectId` | `string` | **required** | MetricShift project ID |
|
|
225
|
+
| `apiKey` | `string` | **required** | Project API key |
|
|
226
|
+
| `apiUrl` | `string` | `https://metricshift-sdk-be-production.up.railway.app` | MetricShift API backend endpoint |
|
|
227
|
+
| `buttonText` | `string` | `Feedback` | Main label |
|
|
228
|
+
| `subtitleText` | `string` | `undefined` | Optional second line |
|
|
229
|
+
| `avatarSrc` | `string` | `undefined` | Avatar / image URL |
|
|
230
|
+
| `avatarAlt` | `string` | `''` | Accessible alt text |
|
|
231
|
+
| `avatarSize` | `number` | `40` | Avatar diameter (px) |
|
|
232
|
+
| `variant` | `'solid' \| 'outline' \| 'ghost'` | `'outline'` | Visual style |
|
|
233
|
+
| `accentColor` | `string` | `'#111827'` | Brand accent color |
|
|
234
|
+
| `position` | `'bottom-right' \| 'bottom-left' \| 'top-right' \| 'top-left' \| 'inline'` | `'bottom-right'` | Widget placement |
|
|
235
|
+
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
|
|
236
|
+
| `customStyles` | `CSSProperties` | `{}` | Inline style overrides |
|
|
237
|
+
| `customClassName` | `string` | `''` | Custom CSS class |
|
|
238
|
+
| `onOpen` | `() => void` | — | Fired when modal opens |
|
|
239
|
+
| `onClose` | `() => void` | — | Fired when modal closes |
|
|
240
|
+
| `onSuccess` | `(id: string) => void` | — | Fired on successful submission |
|
|
241
|
+
| `onError` | `(error: Error) => void` | — | Fired on submission error |
|
|
242
|
+
|
|
240
243
|
📊 Dashboard
|
|
241
244
|
|
|
242
245
|
Your MetricShift dashboard includes:
|
package/package.json
CHANGED