Starting cancellable loaders
This commit is contained in:
@ -29,7 +29,7 @@ export default class Notifications extends React.Component{
|
||||
case 'loading':
|
||||
return (
|
||||
<div className="loading notification" key={notification.id}>
|
||||
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.removeNotification(notification.id) } />
|
||||
<FontAwesome name="close" className="close-button" onClick={ e => this.props.uiActions.cancelLoading(notification.id) } />
|
||||
{ notification.content }
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -235,7 +235,14 @@ export function createNotification(content, type = 'default', id = helpers.gener
|
||||
}
|
||||
}
|
||||
|
||||
export function removeNotification( id ){
|
||||
export function cancelLoading(id){
|
||||
return {
|
||||
type: 'CANCEL_LOADING_'+id,
|
||||
id: id
|
||||
}
|
||||
}
|
||||
|
||||
export function removeNotification(id){
|
||||
return {
|
||||
type: 'REMOVE_NOTIFICATION',
|
||||
id: id
|
||||
|
||||
Reference in New Issue
Block a user