Skip to content

Commit

Permalink
fix: ∆
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLantz committed Jan 27, 2017
1 parent 6be9f91 commit c081b20
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ <h3>Alerts Event API</h3>
document.body.dispatchEvent(new CustomEvent('triggerAlert', {
"detail":{
"alertList":[{
"id" : new Date().getTime(),
"alertType" : type,
"alertMessage": type + ' test message'
}]
Expand Down
6 changes: 3 additions & 3 deletions src/js/AlertList.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class AlertList extends Component {
render () {
console.log(this.state.e)
return (
<ul className="alertList" >
<ReactCSSTransitionGroup transitionName="transition" transitionEnterTimeout={500} transitionLeaveTimeout={800} className="alertList" >
{this.renderAlert(this.state.alertList)}
</ul>
</ReactCSSTransitionGroup>
)
}

Expand All @@ -42,7 +42,7 @@ function _handleClose (closeIndex) {
function _renderAlert (alertList) {
return alertList.map((alert, index) =>
<Alert
key = {index}
key = {alert.id}
index = {index}
alertType = {alert.alertType}
alertMessage = {alert.alertMessage}
Expand Down
52 changes: 25 additions & 27 deletions src/scss/component-specific.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
position:relative;
margin-top: 30px;
list-style:none;
animation-name: openAlert;
animation-duration: 0.3s;
//animation-name: openAlert;
//animation-duration: 0.3s;
background-color: #ffffff;
padding: $alert-padding;
}
Expand All @@ -32,10 +32,10 @@ svg {
width: 0;
}

@keyframes openAlert {
0% { top: -700px; }
100% { top: 0px; }
}
//@keyframes openAlert {
// 0% { top: -700px; }
// 100% { top: 0px; }
//}

.error-title {
color: #db0020;
Expand All @@ -62,39 +62,37 @@ svg {
list-style:none;
background-color: #ffffff;
padding: $alert-padding;
animation-name: closeAlert;
animation-duration: 1.2s;
//animation-name: closeAlert;
//animation-duration: 1.2s;
}

@keyframes closeAlert {
0% { right: 0px;}
100% { right: 1500px;}
}
//@keyframes closeAlert {
// 0% { right: 0px;}
// 100% { right: 1500px;}
//}


//=========================================

//.transition-enter {
// transform: translate(0,-250px);
// transform: translate3d(0,-250px,0);
//}
//.transition-enter.transition-enter-active {
// transform: translate(0,0);
// transform: translate3d(0,0,0);
// transition-property: transform;
// transition-duration: 300ms;
// transition-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
//}
.transition-enter {
transform: translate(0,-250px);
transform: translate3d(0,-250px,0);
}
.transition-enter.transition-enter-active {
transform: translate(0,0);
transform: translate3d(0,0,0);
transition-property: transform;
transition-duration: 300ms;
transition-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
}
.transition-leave {
opacity:0;
transform: translate(0,0,0);
transform: translate3d(0,0,0);
transition-property: transform, opacity;
transition-duration: 2800ms;
transition-property: transform;
transition-duration: 800ms;
transition-timing-function: cubic-bezier(0.175, 0.665, 0.320, 1), linear;
}
.transition-leave.transition-leave-active {
opacity: 0;
transform: translate(-1450px,0);
transform: translate3d(-1450px,0,0);
}

0 comments on commit c081b20

Please sign in to comment.