mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 14:05:11 +01:00
feat: Swipeable media
This commit is contained in:
parent
a6d8d1036a
commit
bc6e958229
@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import ReactSwipeable from 'react-swipeable';
|
||||||
import LoadingIndicator from '../../../components/loading_indicator';
|
import LoadingIndicator from '../../../components/loading_indicator';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@ -84,7 +85,9 @@ class MediaModal extends ImmutablePureComponent {
|
|||||||
|
|
||||||
<div className='media-modal__content'>
|
<div className='media-modal__content'>
|
||||||
<IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />
|
<IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />
|
||||||
|
<ReactSwipeable onSwipedRight={this.handlePrevClick} onSwipedLeft={this.handleNextClick}>
|
||||||
{content}
|
{content}
|
||||||
|
</ReactSwipeable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{rightNav}
|
{rightNav}
|
||||||
|
Loading…
Reference in New Issue
Block a user