@qaiddev/thumbs-embed 1.0.12 → 1.0.13
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 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,9 +11,9 @@ npm install @qaiddev/thumbs-embed
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import {
|
|
14
|
+
import { QaidEmbed } from '@qaiddev/thumbs-embed';
|
|
15
15
|
|
|
16
|
-
const feedback = new
|
|
16
|
+
const feedback = new QaidEmbed({
|
|
17
17
|
endpoint: 'https://qaid.dev/api/feedback',
|
|
18
18
|
apiKey: 'YOUR_API_KEY',
|
|
19
19
|
});
|
|
@@ -108,7 +108,7 @@ We offer a Free Plan for a compatible endpoint and a dashboard to manage your si
|
|
|
108
108
|
Pass a `colors` object to customize the color scheme:
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
|
-
new
|
|
111
|
+
new QaidEmbed({
|
|
112
112
|
endpoint: '/api/feedback',
|
|
113
113
|
colors: {
|
|
114
114
|
positive: 'rgb(0, 200, 83)', // Thumbs up color (default: green)
|
|
@@ -125,7 +125,7 @@ Colors accept hex (`#ABC`, `#AABBCC`) or `rgb(r, g, b)` format.
|
|
|
125
125
|
Replace the default thumb icons with SVG strings or emoji:
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
|
-
new
|
|
128
|
+
new QaidEmbed({
|
|
129
129
|
endpoint: '/api/feedback',
|
|
130
130
|
positiveIcon: '<svg viewBox="0 0 24 24">...</svg>',
|
|
131
131
|
negativeIcon: '<svg viewBox="0 0 24 24">...</svg>',
|
|
@@ -137,7 +137,7 @@ new FeedbackEmbed({
|
|
|
137
137
|
Every user-facing string can be overridden via the `text` object:
|
|
138
138
|
|
|
139
139
|
```typescript
|
|
140
|
-
new
|
|
140
|
+
new QaidEmbed({
|
|
141
141
|
endpoint: '/api/feedback',
|
|
142
142
|
text: {
|
|
143
143
|
tooltip: 'Any feedback? Click to start, Esc to cancel',
|
|
@@ -157,7 +157,7 @@ new FeedbackEmbed({
|
|
|
157
157
|
Enable automatic screenshot capture with feedback submissions:
|
|
158
158
|
|
|
159
159
|
```typescript
|
|
160
|
-
new
|
|
160
|
+
new QaidEmbed({
|
|
161
161
|
endpoint: '/api/feedback',
|
|
162
162
|
captureScreenshot: true,
|
|
163
163
|
screenshotOptions: {
|
|
@@ -213,7 +213,7 @@ By default, the embed creates a fixed-position container in the viewport corner.
|
|
|
213
213
|
<div id="my-feedback-spot"></div>
|
|
214
214
|
|
|
215
215
|
<script>
|
|
216
|
-
new
|
|
216
|
+
new QaidEmbed({
|
|
217
217
|
endpoint: '/api/feedback',
|
|
218
218
|
container: '#my-feedback-spot',
|
|
219
219
|
});
|
|
@@ -227,7 +227,7 @@ When `container` is set, the `position`, `offset`, and `zIndex` options are igno
|
|
|
227
227
|
Use `buttonClass` to apply your own CSS instead of the default button styles:
|
|
228
228
|
|
|
229
229
|
```typescript
|
|
230
|
-
new
|
|
230
|
+
new QaidEmbed({
|
|
231
231
|
endpoint: '/api/feedback',
|
|
232
232
|
buttonClass: 'my-feedback-btn',
|
|
233
233
|
});
|
|
@@ -254,7 +254,7 @@ When `buttonClass` is provided, default button colors, sizing, and shadows are n
|
|
|
254
254
|
### Constructor
|
|
255
255
|
|
|
256
256
|
```typescript
|
|
257
|
-
const feedback = new
|
|
257
|
+
const feedback = new QaidEmbed(config: FeedbackConfig);
|
|
258
258
|
```
|
|
259
259
|
|
|
260
260
|
### Methods
|
|
@@ -372,7 +372,7 @@ Sign up at [qaid.dev](https://qaid.dev). You can also self-host — the embed wo
|
|
|
372
372
|
The embed is endpoint-agnostic. Point it at your own server:
|
|
373
373
|
|
|
374
374
|
```typescript
|
|
375
|
-
new
|
|
375
|
+
new QaidEmbed({
|
|
376
376
|
endpoint: 'https://your-server.com/api/feedback',
|
|
377
377
|
});
|
|
378
378
|
```
|