Skip to content

Instantly share code, notes, and snippets.

@sueannioanis
Last active May 16, 2020 04:31
Show Gist options
  • Select an option

  • Save sueannioanis/65dce11ab48909801589d36b2bc07821 to your computer and use it in GitHub Desktop.

Select an option

Save sueannioanis/65dce11ab48909801589d36b2bc07821 to your computer and use it in GitHub Desktop.
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