Toast
Notification system based on the react-toastify package.
Usage
// Add the ToastContainer component to the app
import { ToastContainer } from '@binarycapsule/ui-capsules';
ReactDOM.render(
<>
<App />
<ToastContainer />
</>,
document.getElementById('root'),
);
// Launch toasts everywhere else in your app by using
// one of the static toast methods:
// - success
// - warning
// - error
// - info
import { toast } from '@binarycapsule/ui-capsules';
toast.success({
title: 'Success',
message: 'A success toast is visible on the screen',
});
Knobs 🎛
success
<Button
onClick={() =>
toast.success({
title: Done!,
message: Super awesome notification
})
}
leftIcon="bell"
>
Give me a toast
</Button>