Skip to content

Commit 92e0699

Browse files
committed
feat: add editor
1 parent c041ac5 commit 92e0699

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed

docs/customization/layout.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ The table below lists all the available properties you can set:
3939
| `rating-mode` | **Type**: `string`<br />**Default value**: `thumbs` <br /><br /> **Available values:** `thumbs`, `stars`<br /><br />Type of rating system.|
4040
| `sessionId` | **Type**: `string`<br />**Default value**: Autogenerated <br /><br /> Identifies the current user session. By default, this value is autogenerated if not provided. You can override it to specify a custom session ID, which can be useful for tracking or linking specific sessions across different analytics tools. |
4141
| `submit` | **Type**: `boolean`<br />**Default**: `false`<br /><br />If set to `true`, submits feedback automatically without opening the modal, using the provided `rating` value. If not set, the default rating of `0` (negative feedback) is sent. |
42+
| `privacy-policy-text` | **Type**: `string`<br />**Default value**: `I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.`<br /><br />Privacy policy text. |
43+
| `screenshot-taking-text` | **Type**: `string`<br />**Default value**: `Taking screenshot`<br />Text displayed while taking a screenshot.<br /><br />|
44+
| `canvas-editor-title` | **Type**: `string`<br />**Default value**: `Edit screenshot`<br />Title for the canvas editor modal.<br /><br />|
45+
| `canvas-editor-cancel-text` | **Type**: `string`<br />**Default value**: `Cancel`<br />Text for the cancel button in the canvas editor.<br /><br />|
46+
| `canvas-editor-save-text` | **Type**: `string`<br />**Default value**: `Save`<br />Text for the save button in the canvas editor.<br /><br />|
4247

4348
## Examples
4449

docs/customization/styles.mdx

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,27 @@ The tables below lists all the available properties you can override:
113113
}
114114
```
115115

116-
### Screenshot mode properties
116+
### Screenshot editor properties
117117

118118
```css
119119
:root {
120-
--feedback-modal-screenshot-bg-color: rgba(0, 0, 0, 0.4);
121-
--feedback-modal-screenshot-close-color: var(--feedback-dark-color);
122-
--feedback-modal-screenshot-header-bg-color: var(--feedback-white-color);
123-
--feedback-modal-screenshot-header-text-color: var(--feedback-dark-color);
124-
--feedback-modal-screenshot-header-z-index: 250;
125-
--feedback-modal-screnshot-z-index: 100;
120+
--feedback-canvas-editor-bg-color: var(--feedback-white-color);
121+
--feedback-canvas-editor-border-color: var(--feedback-light-color);
122+
--feedback-canvas-editor-header-bg-color: var(--feedback-secondary-color);
123+
--feedback-canvas-editor-tool-bg-color: var(--feedback-white-color);
124+
--feedback-canvas-editor-tool-bg-hover: var(--feedback-secondary-color);
125+
--feedback-canvas-editor-tool-bg-active: var(--feedback-primary-color);
126+
--feedback-canvas-editor-tool-text-color: var(--feedback-text-color);
127+
--feedback-canvas-editor-tool-text-active: var(--feedback-white-color);
128+
--feedback-canvas-editor-action-primary-bg: var(--feedback-primary-color);
129+
--feedback-canvas-editor-action-primary-text: var(--feedback-white-color);
130+
--feedback-canvas-editor-action-secondary-bg: var(--feedback-white-color);
131+
--feedback-canvas-editor-action-secondary-text: var(--feedback-text-color);
132+
--feedback-canvas-editor-action-secondary-border: var(--feedback-light-color);
133+
--feedback-canvas-editor-divider-color: var(--feedback-light-color);
134+
--feedback-canvas-editor-content-bg: var(--feedback-secondary-color);
135+
--feedback-canvas-editor-resize-handle-color: var(--feedback-primary-color);
136+
--feedback-canvas-editor-slider-track: var(--feedback-light-color);
126137
}
127138
```
128139

@@ -147,6 +158,18 @@ The tables below lists all the available properties you can override:
147158
--feedback-modal-screenshot-close-color: var(--feedback-white-color);
148159
--feedback-modal-screenshot-header-bg-color: var(--feedback-dark-color);
149160
--feedback-modal-screenshot-header-text-color: var(--feedback-white-color);
161+
--feedback-canvas-editor-bg-color: var(--feedback-dark-color);
162+
--feedback-canvas-editor-border-color: var(--feedback-light-color);
163+
--feedback-canvas-editor-header-bg-color: var(--feedback-light-color);
164+
--feedback-canvas-editor-tool-bg-color: var(--feedback-light-color);
165+
--feedback-canvas-editor-tool-bg-hover: #4a4a4a;
166+
--feedback-canvas-editor-tool-text-color: var(--feedback-white-color);
167+
--feedback-canvas-editor-action-secondary-bg: var(--feedback-light-color);
168+
--feedback-canvas-editor-action-secondary-text: var(--feedback-white-color);
169+
--feedback-canvas-editor-action-secondary-border: var(--feedback-light-color);
170+
--feedback-canvas-editor-content-bg: var(--feedback-light-color);
171+
--feedback-canvas-editor-divider-color: #4a4a4a;
172+
--feedback-canvas-editor-slider-track: #4a4a4a;
150173
}
151174
```
152175

docs/customization/text.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ The table below lists all the available properties you can override:
3535
| `modal-title` | **Type**: `string`<br />**Default value**: `Share your feedback`<br />Title of the feedback modal.<br /><br /> |
3636
| `modal-title-error` | **Type**: `string`<br />**Default value**: `Oops!`<br />Title displayed when there's an error submitting feedback.<br /><br />|
3737
| `modal-title-success` | **Type**: `string`<br />**Default value**: `Thanks for your feedback!`<br />Title displayed upon successful feedback submission.<br /><br />|
38-
| `privacy-policy-text` | **Type**: `boolean`<br />**Default value**: `I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.`<br /><br />Privacy policy text. |
38+
| `privacy-policy-text` | **Type**: `string`<br />**Default value**: `I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.`<br /><br />Privacy policy text. |
3939
| `rating-placeholder` | **Type**: `string`<br />**Default value**: `Was this page helpful?`<br />Heading for the feedback rating feature (thumbs).<br /><br />|
4040
| `rating-stars-placeholder` | **Type**: `string`<br />**Default value**: `How would you rate this page`<br />Heading for the feedback rating feature (stars).<br /><br />|
4141
| `screenshot-attached-text` | **Type**: `string`<br />**Default**: `Screenshot attached text`<br />Label for the screenshot button when a screenshot has been attached..<br /><br /> |
4242
| `screenshot-button-text` | **Type**: `string`<br />**Default value**: `Take a Screenshot`<br />Label for the screenshot button.<br /><br /> |
43+
| `screenshot-taking-text` | **Type**: `string`<br />**Default value**: `Taking screenshot ...`<br />Text displayed while taking a screenshot.<br /><br />|
4344
| `screenshot-topbar-text` | **Type**: `string`<br />**Default value**: `SELECT AN ELEMENT ON THE PAGE`<br />Instructional text when taking a screenshot.<br /><br />|
4445
| `send-button-text` | **Type**: `string`<br />**Default value**: `Send`<br />Text for the button that submits feedback.<br /><br /> |
46+
| `canvas-editor-title` | **Type**: `string`<br />**Default value**: `Edit screenshot`<br />Title for the canvas editor modal.<br /><br />|
47+
| `canvas-editor-cancel-text` | **Type**: `string`<br />**Default value**: `Cancel`<br />Text for the cancel button in the canvas editor.<br /><br />|
48+
| `canvas-editor-save-text` | **Type**: `string`<br />**Default value**: `Save`<br />Text for the save button in the canvas editor.<br /><br />|
4549

4650
## Example
4751

0 commit comments

Comments
 (0)