Skip to content

Commit

Permalink
✨ feat: Set a custom response icon's color with a "iconColor" output …
Browse files Browse the repository at this point in the history
…parameter
  • Loading branch information
jolzee committed Nov 2, 2020
1 parent 58cc851 commit 8daa82a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/ChatTeneoResponse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<v-icon
v-else
large
:color="!$vuetify.theme.dark ? responseLookAndFeel.iconColor : 'indigo'"
:color="!$vuetify.theme.dark ? getResponseIconColor : 'indigo'"
class="teneo-response-icon"
>{{ getResponseIcon }}</v-icon
>
Expand Down Expand Up @@ -573,6 +573,18 @@ export default {
return routerCheckList;
},
getResponseIconColor() {
let iconColor = this.responseLookAndFeel.iconColor;
if ("teneoResponse" in this.item) {
const tResp = TIE.wrap(this.item.teneoResponse);
if (tResp.hasParameter("iconColor")) {
iconColor = tResp.getParameter("iconColor");
logger.info("Custom Icon Color:" + iconColor);
}
}
return iconColor;
},
getResponseIcon() {
let icon = this.responseIcon;
Expand Down

0 comments on commit 8daa82a

Please sign in to comment.