-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
145 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@import 'react-toastify/dist/ReactToastify.min.css'; | ||
|
||
/** Used to define container behavior: width, position: fixed etc... **/ | ||
.Toastify__toast-container { | ||
} | ||
|
||
/** Classes for the displayed toast **/ | ||
.Toastify__toast { | ||
@apply text-center text-lg; | ||
@apply rounded-sm; | ||
@apply shadow-lg; | ||
min-height: 58px; | ||
} | ||
|
||
.Toastify__toast--rtl { | ||
} | ||
.Toastify__toast--dark { | ||
} | ||
.Toastify__toast--default { | ||
} | ||
.Toastify__toast--info { | ||
} | ||
.Toastify__toast--success { | ||
@apply bg-green-400; | ||
} | ||
.Toastify__toast--warning { | ||
} | ||
.Toastify__toast--error { | ||
@apply bg-red-300; | ||
} | ||
|
||
.Toastify__close-button { | ||
@apply hidden; | ||
} | ||
|
||
@responsive { | ||
@screen sm { | ||
.Toastify__toast { | ||
@apply font-normal text-base; | ||
} | ||
} | ||
@screen md { | ||
.Toastify__close-button { | ||
@apply block; | ||
} | ||
} | ||
@screen lg { | ||
.Toastify__toast { | ||
min-height: 64px; | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { toast } from 'react-toastify'; | ||
|
||
const defaultOptions = { | ||
position: 'top-right', | ||
autoClose: 1400, | ||
hideProgressBar: true, | ||
closeOnClick: true, | ||
progress: false, | ||
}; | ||
|
||
const localToast = { | ||
success(content, options) { | ||
return toast.success(content, { ...defaultOptions, ...options }); | ||
}, | ||
error(content, options) { | ||
return toast.error(content, { ...defaultOptions, ...options }); | ||
}, | ||
info(content, options) { | ||
return toast.dark(content, { ...defaultOptions, ...options }); | ||
}, | ||
}; | ||
|
||
export { localToast as toast }; |
This file contains 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