Skip to content

Commit 1ddb01c

Browse files
Converted tabs to spaces in notify.js
1 parent f6b3df1 commit 1ddb01c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/notify.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import {defaults} from './defaults';
77
/* Render React component */
88
function renderToast(text, type, timeout, color) {
99
let target = document.getElementById(defaults.wrapperId);
10-
ReactDOM.render(<Toast text={text} timeout={timeout} type={type} color={color}/>, target);
10+
ReactDOM.render(<Toast text={text} timeout={timeout} type={type} color={color}/>, target);
1111
}
1212

1313
/* Unmount React component */
1414
function hide() {
1515
let target = document.getElementById(defaults.wrapperId);
16-
ReactDOM.unmountComponentAtNode(target);
16+
ReactDOM.unmountComponentAtNode(target);
1717
}
1818

1919

@@ -32,24 +32,24 @@ function hide() {
3232
* }
3333
*/
3434
function show(text, type, timeout, color) {
35-
if (!document.getElementById(defaults.wrapperId).hasChildNodes()) {
35+
if (!document.getElementById(defaults.wrapperId).hasChildNodes()) {
3636
// Use default timeout if not set.
37-
let renderTimeout = timeout || defaults.timeout;
37+
let renderTimeout = timeout || defaults.timeout;
3838

39-
// Render Component with Props.
40-
renderToast(text, type, renderTimeout, color);
39+
// Render Component with Props.
40+
renderToast(text, type, renderTimeout, color);
4141

42-
if (renderTimeout === -1) {
43-
return false;
44-
}
42+
if (renderTimeout === -1) {
43+
return false;
44+
}
4545

46-
// Unmount react component after the animation finished.
47-
setTimeout(function() {
48-
hide();
49-
}, renderTimeout + defaults.animationDuration);
46+
// Unmount react component after the animation finished.
47+
setTimeout(function() {
48+
hide();
49+
}, renderTimeout + defaults.animationDuration);
5050

5151
return true;
52-
}
52+
}
5353

5454
return false;
5555
}
@@ -110,7 +110,7 @@ function createShowQueue(initialRecallDelay = 500, recallDelayIncrement = 500) {
110110

111111
/* Export notification functions */
112112
export let notify = {
113-
show,
113+
show,
114114
hide,
115115
createShowQueue
116116
};

0 commit comments

Comments
 (0)