How to use the bpk-component-banner-alert.withBannerAlertState function in bpk-component-banner-alert

To help you get started, we’ve selected a few bpk-component-banner-alert examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Skyscanner / backpack / packages / bpk-docs / src / pages / WebBannerAlertsPage / BannerAlertsPage.js View on Github external
const BannerAlert = withDefaultProps(BpkBannerAlert, {
  className: componentClassName,
  toggleButtonLabel: 'See more',
});

const BannerAlertExpandable = withDefaultProps(
  withBannerAlertState(BpkBannerAlertExpandable),
  {
    className: componentClassName,
    toggleButtonLabel: 'See more',
  },
);

const BannerAlertDismissable = withDefaultProps(
  withBannerAlertState(BpkBannerAlertDismissable),
  {
    className: componentClassName,
    dismissButtonLabel: 'Dismiss',
  },
);

const longMessage = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sagittis sagittis purus, id
blandit ipsum. Pellentesque nec diam nec erat condimentum dapibus. Nunc diam augue, egestas id egestas ut, facilisis
nec mi. Donec et congue odio, nec laoreet est. Integer rhoncus varius arcu, a fringilla libero laoreet at. Mauris
porta varius ullamcorper. Sed laoreet libero mauris, non pretium lectus accumsan et. Suspendisse vehicula ullamcorper
sapien, et dapibus mi aliquet non. Pellentesque auctor sagittis lectus vitae rhoncus. Fusce id enim porttitor, mattis
ante in, vestibulum nulla.`;
const richMessage = (
  <span style="{{">
    Successful alert with custom rendered message
  </span>
github Skyscanner / backpack / packages / bpk-docs / src / pages / WebBannerAlertsPage / BannerAlertsPage.js View on Github external
import DocsPageBuilder from '../../components/DocsPageBuilder';
import Paragraph from '../../components/Paragraph';

import STYLES from './bpk-banner-alerts-page.scss';

const getClassName = cssModules(STYLES);
const componentClassName = getClassName('bpk-banner-alerts-page__component');

const BannerAlert = withDefaultProps(BpkBannerAlert, {
  className: componentClassName,
  toggleButtonLabel: 'See more',
});

const BannerAlertExpandable = withDefaultProps(
  withBannerAlertState(BpkBannerAlertExpandable),
  {
    className: componentClassName,
    toggleButtonLabel: 'See more',
  },
);

const BannerAlertDismissable = withDefaultProps(
  withBannerAlertState(BpkBannerAlertDismissable),
  {
    className: componentClassName,
    dismissButtonLabel: 'Dismiss',
  },
);

const longMessage = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sagittis sagittis purus, id
blandit ipsum. Pellentesque nec diam nec erat condimentum dapibus. Nunc diam augue, egestas id egestas ut, facilisis

bpk-component-banner-alert

Backpack banner alert component.

Apache-2.0
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Similar packages