Skip to content

Commit

Permalink
Merge branch 'MDL-72544' of git://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Oct 1, 2021
2 parents 4beb17e + e8d7817 commit f4604fe
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/copy_to_clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/copy_to_clipboard.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/amd/build/toast.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/build/toast.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/amd/src/copy_to_clipboard.js
Expand Up @@ -155,7 +155,7 @@ const displaySuccessToast = copyButton => getSuccessText(copyButton)
* @private
*/
const displayFailureToast = () => getFailureText()
.then(message => addToast(message, {}));
.then(message => addToast(message, {type: 'warning'}));

/**
* Fetches the failure message to show to the user.
Expand Down
3 changes: 2 additions & 1 deletion lib/amd/src/toast.js
Expand Up @@ -51,7 +51,7 @@ export const addToastRegion = async(parent) => {
* @param {Object} configuration
* @param {String} [configuration.title]
* @param {String} [configuration.subtitle]
* @param {String} [configuration.type] Optional type of the toast notification ('success', 'info', 'warning' or 'danger')
* @param {String} [configuration.type=info] Optional type of the toast notification ('success', 'info', 'warning' or 'danger')
* @param {Boolean} [configuration.autohide=true]
* @param {Boolean} [configuration.closeButton=false]
* @param {Number} [configuration.delay=4000]
Expand All @@ -74,6 +74,7 @@ export const addToastRegion = async(parent) => {
export const add = async(message, configuration) => {
const pendingPromise = new Pending('addToastRegion');
configuration = {
type: 'info',
closeButton: false,
autohide: true,
delay: 4000,
Expand Down

0 comments on commit f4604fe

Please sign in to comment.