This repository has been archived by the owner on Sep 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
43 lines (40 loc) · 1.4 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.scss';
import GithubRibbon from './components/GithubRibbon'
import {ToastContainer, success, error, info} from './components/Toasts'
class App extends Component {
render() {
return (
<div className="App">
<ToastContainer
position="top-center"
autoClose={5000}
newestOnTop
closeOnClick = {false}
rtl={false}
pauseOnVisibilityChange
pauseOnHover
className="custom-toast-container"
/>
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Pick a button to start toasting</h1>
<GithubRibbon repositoryUrl={"https://github.com/shirbr510/react-toastify-demo"}/>
</header>
<p className="App-intro">
<button onClick={()=>success("Whatever you tried doing, it worked!")} style={{margin:"10px"}}>
I'm successful!
</button>
<button onClick={()=>error("Oh no! something went horribly wrong!")} style={{margin:"10px"}}>
I'm a failure!
</button>
<button onClick={()=>info("this is a very important piece of information!")} style={{margin:"10px"}}>
I'm just here to provide info!
</button>
</p>
</div>
);
}
}
export default App;