openNotification Examples

<div class="e-buttongroup">
  <a class="e-btn open-notification-button" id="openNotificationOnTopButton" href="#0" data-placement="top">
    Open Top Notification
  </a>
  <a class="e-btn open-notification-button" id="openNotificationOnBottomRightButton" href="#0" data-placement="bottom-right">
    Open Bottom-Right Notification
  </a>
</div>
let count = 1;

document.getElementById('openNotificationOnTopButton').addEventListener('click', event => {
  window.e.utils.v2.ui.openNotification({
    title: `Notification Title Goes Here #${count++}`,
    content: 'Lorem ipsum dolor sit amet.',
    helpPortalLink: {
      articleId: 'fdf2e60e74c11014a81ee05ad954b102',
      articleAnchor: 'email-content-check'
    },
    buttons: [
      {
        text: 'Button Label',
        icon: 'pencil',
        primary: true,
        onClick: () => console.log('button clicked')
      }
    ],
    placement: 'top'
  });
});

document.getElementById('openNotificationOnBottomRightButton').addEventListener('click', event => {
  window.e.utils.v2.ui.openNotification({
    title: `Notification Title Goes Here #${count++}`,
    content: 'Lorem ipsum dolor sit amet.',
    buttons: [
      {
        text: 'Button Label',
        icon: 'pencil',
        primary: true,
        onClick: () => console.log('button clicked')
      }
    ],
    placement: 'bottom-right'
  });
});