Improve performance of modal and swipe animations (#5135)
* Improve performance of modal and swipe animations * Fix eslint issues
This commit is contained in:
committed by
Eugen Rochko
parent
3406e30526
commit
6e0659c838
@ -84,14 +84,17 @@ export default class MediaModal extends ImmutablePureComponent {
|
||||
return null;
|
||||
}).toArray();
|
||||
|
||||
const containerStyle = {
|
||||
alignItems: 'center', // center vertically
|
||||
};
|
||||
|
||||
return (
|
||||
<div className='modal-root__modal media-modal'>
|
||||
{leftNav}
|
||||
|
||||
<div className='media-modal__content'>
|
||||
<IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />
|
||||
|
||||
<ReactSwipeableViews onChangeIndex={this.handleSwipe} index={index} animateHeight>
|
||||
<ReactSwipeableViews containerStyle={containerStyle} onChangeIndex={this.handleSwipe} index={index}>
|
||||
{content}
|
||||
</ReactSwipeableViews>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user