Fix Notification Close (#700)
This commit is contained in:
parent
ec37eeffe8
commit
349bf5bba5
|
@ -11,23 +11,15 @@ interface Props {
|
||||||
closeNotification: TCloseNotification;
|
closeNotification: TCloseNotification;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Transition: React.SFC<{}> = ({ children }) => (
|
|
||||||
<CSSTransition
|
|
||||||
children={children}
|
|
||||||
classNames="NotificationAnimation"
|
|
||||||
timeout={{ enter: 500, exit: 500 }}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
|
|
||||||
export class Notifications extends React.Component<Props, {}> {
|
export class Notifications extends React.Component<Props, {}> {
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
return (
|
||||||
<TransitionGroup className="Notifications">
|
<TransitionGroup className="Notifications">
|
||||||
{this.props.notifications.map(n => {
|
{this.props.notifications.map(n => {
|
||||||
return (
|
return (
|
||||||
<Transition key={n.id}>
|
<CSSTransition classNames="NotificationAnimation" timeout={500} key={n.id}>
|
||||||
<NotificationRow notification={n} onClose={this.props.closeNotification} />
|
<NotificationRow notification={n} onClose={this.props.closeNotification} />
|
||||||
</Transition>
|
</CSSTransition>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
|
|
Loading…
Reference in New Issue