1.0.0 • Published 11 months ago

@wpmudev/shared-notifications-banner v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
11 months ago

License: GPLv3 npm

Banner Notification

This package works as a Shared Module between WPMU DEV plugins and it allows us to notify users about an special price for our products.

Installation

npm i @wpmudev/shared-notifications-banner --save-dev

Usage

Javascript Instantiation

import React from 'react';
import { NoticeBanner } from '@wpmudev/shared-notifications-banner';

import image1x from './sample-image.png';
import image2x from './sample-image@2x.png';

const MyApp = () => {
    return (
        <NoticeBanner
            title="Hosting by the Same People Behind Forminator!"
            image={ image1x }
            imageRetina={ image2x }
            disclaimer="Only admin users can see this message"
            buttonLabel="Claim Your 50% Off Hosting Now!"
            buttonLink="https://premium.wpmudev.com/"
        >
            <p>Unleash the Full Power of Your Site with WPMU DEV Hosting! Lightning-Fast Speed, Robust Security, 24/7 Expert Support, and Effortless Ease of Use. Take Your Sites to the Next Level Today with 50% off the First Month!</p>
        </NoticeBanner>
    );
}

Properties

Prop NameTypeDescription
title*stringSet a catchy title for notification.
imagestringWhen not empty, allows you to show an image at left of the main content.
imageRetinastringMake sure image shows up correctly on bigger displays.
disclaimerstringThis text goes below content in smaller size to highlight it from the rest.
buttonLabelstringSets call to action button label.
buttonLinkstringSets call to action button URL.