Improve performance of modal and swipe animations (#5135)
* Improve performance of modal and swipe animations * Fix eslint issues
This commit is contained in:
parent
3406e30526
commit
6e0659c838
3 changed files with 40 additions and 41 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue