2.0.2 • Published 10 months ago

@wpmudev/shared-notifications-black-friday v2.0.2

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

License: GPLv3 npm

Black Friday Notification

This package works as a Shared Module between WPMU DEV plugins and it allows us to notify users about Black Friday offers.

Installation

npm i @wpmudev/shared-notifications-black-friday --save-dev

Usage

Javascript Instantiation

import React from 'react';
import { NoticeBlack } from '@wpmudev/shared-notifications-black-friday';

const MyApp = () => {
    return (
        <NoticeBlack
            link="https://wpmudev.com/"
            sourceLang={
				discount: "50% Off",
				closeLabel: "Close",
				linkLabel: "See the deal"
			}
        >
            <p><strong>Black Friday Offer!</strong> Get a Pro plugin for free and much more with 50% OFF.</p>
			<p><small>*Only admin users can see this message</small></p>
        </NoticeBlack>
    );
}

Properties

Prop NameTypeDescription
linkstringSets call to action button URL.
sourceLangobjectAllows to translate component labels.
onCloseClick-Use this property to pass a function when clicking on close button.