Skip to content

Commit 5a79716

Browse files
Added fix to hide or show the beetle icon on the feedback button (#885)
1 parent d808506 commit 5a79716

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

packages/opc-feedback/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import '@one-platform/opc-feedback/dist/opc-feedback';
9595
| `app` | `Object` value is expected `{ name: 'one platform', url: '/' }` is the default fallback url for docs |
9696
| `theme` | Refer [themes](https://github.com/1-Platform/op-components/tree/master/packages/opc-feedback/README.md#themes) section. |
9797
| `target` | `String` value is expected, it is `_self` by default. Specifies where to open the linked document Url |
98-
| `showBeetleIcon`| `Boolean` value is expected, it is true by default. Specifies to show or hide the parent beetle icon on the button |
98+
| `beetleIcon` | `String` value is expected, it is `show` by default. Specifies to `show` or `hide` the parent beetle icon on the button |
9999

100100

101101
### Default Template

packages/opc-feedback/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opc-feedback/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@one-platform/opc-feedback",
3-
"version": "0.2.2-alpha",
3+
"version": "0.2.3-alpha",
44
"description": "opc-feedback component follows the One Platform design system and can be used as a popup to collect feedback from the end-users.",
55
"scripts": {
66
"dev": "webpack serve",

packages/opc-feedback/src/opc-feedback.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class OpcFeedback extends LitElement {
3030
@property({ type: String, attribute: 'spa' }) spa = undefined;
3131
@property({ type: String, attribute: 'docs' }) docs = undefined;
3232
@property({ type: String, attribute: 'target' }) target = undefined;
33-
@property({ type: Boolean, attribute: 'showBeetleIcon' }) showBeetleIcon = true;
33+
@property({ type: String, attribute: 'beetleIcon' }) beetleIcon = 'show';
3434
@property({ reflect: true }) theme = 'red';
3535
@property({ type: Object }) template = defaultTemplate;
3636
@property({ type: Object }) app = defaultApplication;
@@ -165,12 +165,13 @@ export class OpcFeedback extends LitElement {
165165
}
166166

167167
get renderIcon() {
168+
if(this.beetleIcon !== "hide"){
168169
const isModelOpen =
169170
this._openFeedbackModal ||
170171
this._openConfirmationModal ||
171172
this._openInitialModal ||
172173
this._openBugModal;
173-
if (!isModelOpen && this.showBeetleIcon) {
174+
if (!isModelOpen) {
174175
return html`<img
175176
src=${beetleIcon}
176177
width="20px"
@@ -185,6 +186,7 @@ export class OpcFeedback extends LitElement {
185186
class="pf-u-font-size-xl pf-u-mr-xs"
186187
>
187188
</ion-icon>`;
189+
}
188190
}
189191

190192
get getTarget(){

0 commit comments

Comments
 (0)