@planningcenter/topbar 11.1.0-qa-759.0 → 11.1.0-qa-759.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/topbar.js CHANGED
@@ -442,7 +442,8 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
442
442
  } = this.props;
443
443
  const isPromo = variant === "promo";
444
444
  return /*#__PURE__*/React.createElement("div", {
445
- className: classnames(styles$b["announcement"], isPromo ? styles$b["announcement--promo"] : styles$b["announcement--platform"])
445
+ className: classnames(styles$b["announcement"], styles$b[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
446
+ "data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform"
446
447
  }, !isPromo && /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
447
448
  className: styles$b["announcement-content"],
448
449
  style: style,
@@ -467,9 +468,7 @@ class PlatformAnnouncements extends React.Component {
467
468
  initialAnnouncements: this.props.data,
468
469
  configuredFetch: this.props.configuredFetch
469
470
  }, (data, actions) => {
470
- const isNative = typeof document !== "undefined" && document.documentElement.getAttribute("data-app-context") === "native";
471
- const visibleAnnouncements = data.announcements.filter(a => !(isNative && a.data.style === "promo"));
472
- return visibleAnnouncements.length > 0 ? (/*#__PURE__*/React.createElement("div", null, visibleAnnouncements.map(announcement => this.props.renderItem({
471
+ return data.announcements.length > 0 ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
473
472
  actions,
474
473
  announcement
475
474
  })))) : null;
@@ -481,7 +480,7 @@ PlatformAnnouncements.defaultProps = {
481
480
  renderItem: ({
482
481
  announcement,
483
482
  actions
484
- }) => (/*#__PURE__*/React.createElement(DissmissibleAnnouncement, {
483
+ }) => (/*#__PURE__*/React.createElement(DismissibleAnnouncement, {
485
484
  key: announcement.id,
486
485
  html: announcement.data.html,
487
486
  variant: announcement.data.style,
@@ -505,7 +504,7 @@ function StyledDismissButton$1({
505
504
  }
506
505
  }));
507
506
  }
508
- function DissmissibleAnnouncement(props) {
507
+ function DismissibleAnnouncement(props) {
509
508
  return /*#__PURE__*/React.createElement(StyledAnnouncement$1, {
510
509
  variant: props.variant
511
510
  }, /*#__PURE__*/React.createElement("span", {