-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
The title and cta would normally (as shown in other examples) end up in the same paragraph:
| MzpNotification.init(origin, options); | |
| ``` | |
| You can also pass a range of configuration options: | |
| ```javascript | |
| MzpNotification.init(origin, { | |
| title: 'This is the title.', | |
| cta: { | |
| text: "And this is a CTA link.", | |
| url: "https://www.mozilla.org", | |
| attrs: {"target": "_blank", "rel": "noopener"} | |
| }, | |
| className: 'mzp-t-warning', | |
| closeText: 'Close notification', |
This is how it is rendered:
<aside class="mzp-c-notification-bar mzp-t-warning mzp-is-sticky">
<button class="mzp-c-notification-bar-button" type="button" title="Close notification">Close notification</button>
<p>This is the title.</p>
<a href="https://www.mozilla.org" class="mzp-c-notification-bar-cta" target="_blank" rel="noopener">And this is a CTA link.</a>
</aside>When fixing #1040, I regressed to #559:
It would seem mzp-c-notification-bar-cta was never styled explicitly, so I think additional #1000 (comment) for resilience is in order to render the expected spacing.
Metadata
Metadata
Assignees
Labels
No labels

