Allowing custom templates inside notification note
This commit is contained in:
1 parent
820b2efd88
commit
6fef754651
3 files changed
+20
-4
No files matched your search
@@ -37,7 +37,7 @@ Notifications.dismiss = id => {
|
||||
Notifications.clear = () => Array.from(Notifications.views.keys()).forEach(Notifications.dismiss);
|
||||
|
||||
// Display a notification note
|
||||
Notifications.show = ({ template, promise, text, style, timeout=5000 }) => {
|
||||
Notifications.show = ({ template, data, text, style, timeout=5000, promise }) => {
|
||||
// Check if the given template exists
|
||||
const templateObject = Template[template];
|
||||
if (template && !templateObject) {
|
||||
@@ -52,6 +52,8 @@ Notifications.show = ({ template, promise, text, style, timeout=5000 }) => {
|
||||
|
||||
let notificationPromise;
|
||||
let templateData = {
|
||||
template,
|
||||
data,
|
||||
text,
|
||||
style,
|
||||
timeout,
|
||||
|
||||
Reference in new issue
Block a user