@magenable/top-bar-notification

An extension for Magento PWA Studio that allow to display simple notice at the top of the page

Usage no npm install needed!

<script type="module">
  import magenableTopBarNotification from 'https://cdn.skypack.dev/@magenable/top-bar-notification';
</script>

README

Top Bar Notification

Top Bar Notification is a Magento PWA Studio extension that allow to display simple notice at the top of the page.

Installation

Prerequisite: In Magento 2 instance should be installed next module: https://packagist.org/packages/magenable/module-top-bar-notification

  1. Add dependency to PWA Studio project
yarn add @magenable/top-bar-notification
  1. Wrap the module in your local-intercept.js file
const { Targetables } = require('@magento/pwa-buildpack');
const targetables = Targetables.using(targets);
const topBarNotification = require('@magenable/top-bar-notification/src/targets');
topBarNotification(targetables);
  1. Re-build your PWA project

Upgrade

yarn upgrade @magenable/top-bar-notification

Configuration

For more information about configuration see readme in the next module https://packagist.org/packages/magenable/module-top-bar-notification.

Storefront view:

top-bar-notification-example-1

top-bar-notification-example-2