Skip to content

Commit

Permalink
Merge pull request #489 from 3DStreet/add-warning-notify-option
Browse files Browse the repository at this point in the history
add warning notify option
  • Loading branch information
kfarr authored Mar 7, 2024
2 parents 8c18905 + 416ea48 commit 740f784
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/aframe-street-component.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/components/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ AFRAME.registerComponent('notify', {
type: 'info',
background: 'blue',
icon: false
},
{
type: 'warning',
background: 'orange',
icon: false
}
],
// Set your global Notyf configuration here
Expand All @@ -44,6 +49,9 @@ AFRAME.registerComponent('notify', {
STREET.notify.errorMessage = (messageText) => {
this.message(messageText, 'error');
};
STREET.notify.warningMessage = (messageText) => {
this.message(messageText, 'warning');
};
}
},
message: function (messageText, messageType = 'info') {
Expand Down

0 comments on commit 740f784

Please sign in to comment.