kodobe-react-notifier
v2.0.1
Published
Kodobe React Notifier
Downloads
1
Readme
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)