Last active
May 16, 2020 04:31
-
-
Save sueannioanis/65dce11ab48909801589d36b2bc07821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import Toast from 'react-toast-component'; | |
| function App() { | |
| const [isOpen, setToast] = useState(true); | |
| return ( | |
| <div className="App"> | |
| <Toast | |
| isOpen={isOpen} | |
| hasAutoDismiss={false} | |
| hasCloseBtn={true} | |
| closeCallback={() => setToast(false)} | |
| description="There's some great info in here." | |
| title="App Notification 🍞" | |
| duration={5000} | |
| classNames={[]} // 'error', 'info', 'warning', 'success' | |
| /> | |
| </div> | |
| ); | |
| } | |
| export default App; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment