Skip to content

Commit

Permalink
Merge 7fb5b00 into b49177c
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Sep 24, 2018
2 parents b49177c + 7fb5b00 commit 94cd8f7
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 21 deletions.
8 changes: 4 additions & 4 deletions dist/ReactToastify.css

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

2 changes: 1 addition & 1 deletion dist/ReactToastify.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactToastify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactToastify.min.css

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

8 changes: 4 additions & 4 deletions scss/animations/_slide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@
}
}

@keyframes #{$rt-namespace}__slideOutUp {
@keyframes #{$rt-namespace}__slideOutDown {
from {
@include transform;
}
to {
visibility: hidden;
transform: translate3d(0, 110%, 0);
transform: translate3d(0, 500px, 0);
}
}

@keyframes #{$rt-namespace}__slideOutDown {
@keyframes #{$rt-namespace}__slideOutUp {
from {
@include transform;
}
to {
visibility: hidden;
transform: translate3d(0, -110%, 0);
transform: translate3d(0, -500px, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getY(e) {
: e.clientY;
}

const noop = () => { };
const noop = () => {};

class Toast extends Component {
static propTypes = {
Expand Down
16 changes: 7 additions & 9 deletions src/components/ToastContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ class ToastContainer extends Component {
return closeButton === false
? false
: cloneElement(closeButton, {
closeToast: () => this.removeToast(toastId),
type: type
});
closeToast: () => this.removeToast(toastId),
type: type
});
}

getAutoCloseDelay(toastAutoClose) {
Expand Down Expand Up @@ -259,7 +259,7 @@ class ToastContainer extends Component {
: this.props.draggable,
draggablePercent:
typeof options.draggablePercent === 'number' &&
!isNaN(options.draggablePercent)
!isNaN(options.draggablePercent)
? options.draggablePercent
: this.props.draggablePercent,
closeOnClick:
Expand Down Expand Up @@ -339,18 +339,16 @@ class ToastContainer extends Component {

// group toast by position
collection.forEach(toastId => {
const {position, options, content} = this.collection[toastId];
const { position, options, content } = this.collection[toastId];
toastToRender[position] || (toastToRender[position] = []);

if (this.state.toast.indexOf(options.id) !== -1) {
toastToRender[position].push(
this.makeToast(content, options)
);
toastToRender[position].push(this.makeToast(content, options));
} else {
toastToRender[position].push(null);
delete this.collection[toastId];
}
})
});

return Object.keys(toastToRender).map(position => {
const disablePointer =
Expand Down

0 comments on commit 94cd8f7

Please sign in to comment.