kodobe-react-notifier
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Kodobe React Notifier

This is a simple react notifier package

Install

npm install kodobe-react-notifier

or

yarn add kodobe-react-notifier

Setup

import Notifier from 'kodobe-react-notifier';

Usage

import Notifier from "kodobe-react-notifier";

function App() {
    return (
        <div>
            <h3>Here is how to use a notifier</h3>
             <br />
             <Button
                onClick={() =>
                Notifier.show({
                    heading: "Heading",
                    onCancel: () => null,
                    content: (
                    <div>
                        This is life <b>This is it</b>
                    </div>
                    ),
                })
                }
            >
                Show Notification
            </Button>
        </div>
    );
}

Options

  • content: Any thing
  • heading: Any thing
  • okText: (string)
  • cancelText: (string)
  • onOk: callback for when ok button is clicked (function)
  • onCancel: callback for when cancel button is clicked (function)

Readme

Keywords

none

Package Sidebar

Install

npm i kodobe-react-notifier

Weekly Downloads

2

Version

2.0.1

License

ISC

Unpacked Size

10.3 kB

Total Files

4

Last publish

Collaborators

  • adefemi
  • kodobe