Adding option to add props to alert widget instead of using cmsWidget
This commit is contained in:
parent
35f8b54edf
commit
aabd1749f9
2 changed files with 6 additions and 4 deletions
|
|
@ -9,8 +9,8 @@
|
|||
class="position-absolute rounded-0 w-100 border-0 shadow-sm"
|
||||
v-if="displayGlobalAlert"
|
||||
:alertClass="globalAlertMessage.type"
|
||||
:alertHeadline="globalAlertMessage.messageHeadline"
|
||||
:alertCopy="globalAlertMessage.messageCopy"
|
||||
:manualHeadline="globalAlertMessage.messageHeadline"
|
||||
:manualCopy="globalAlertMessage.messageCopy"
|
||||
v-bind:isDismissible="globalAlertMessage.isDismissible"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -39,13 +39,15 @@ export default {
|
|||
*/
|
||||
alertClass: String,
|
||||
cmsWidgetName: String,
|
||||
manualHeadline: String,
|
||||
manualCopy: String,
|
||||
},
|
||||
computed: {
|
||||
alertHeadline(){
|
||||
return this.getCmsContent(this.cmsWidgetName, 'HeadlineText');
|
||||
return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'HeadlineText') : this.manualHeadline;
|
||||
},
|
||||
alertCopy(){
|
||||
return this.getCmsContent(this.cmsWidgetName, 'BodyText');
|
||||
return this.cmsWidgetName ? this.getCmsContent(this.cmsWidgetName, 'BodyText') : this.manualCopy;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue