2.0.4 • Published 2 years ago

kodobe-react-alert v2.0.4

Weekly downloads
8
License
ISC
Repository
-
Last release
2 years ago

Kodobe React Alert

This is a simple react alert package

Install

npm install kodobe-react-alert

or

yarn add kodobe-react-alert

Setup

import Alert from 'kodobe-react-alert';

Usage

import Alert from "kodobe-react-alert";

function App() {
    return (
        <div>
            <h3>Here is how to use a alert</h3>
             <br />
            <Button
                onClick={() =>
                Alert.showError({
                    content: (
                    <div>
                        This is life <b>This is it</b>
                        <a href="https://google.com">Google</a>
                    </div>
                    ),
                })
                }
            >
                Show Error
            </Button>
        </div>
    );
}

Options

  • content: Any thing
  • timeout: time it takes the alert to go off (number, default: 5s)

Alerts

  • success: Alert.showSuccess()
  • error: Alert.showError()
  • info: Alert.showInfo()
  • default: Alert.show()
2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago