gab-social/app/javascript/gabsocial/components/modal/status_revision_modal.js

40 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-01-29 16:45:17 +00:00
2019-09-17 16:23:51 +01:00
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
2020-02-24 23:25:55 +00:00
import StatusRevisionListContainer from '../../containers/status_revision_list_container';
import IconButton from '../icon_button';
2019-09-17 16:23:51 +01:00
const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
});
2020-02-25 16:04:44 +00:00
export default
@injectIntl
2019-09-17 16:23:51 +01:00
class StatusRevisionModal extends ImmutablePureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,
onClose: PropTypes.func.isRequired,
status: ImmutablePropTypes.map.isRequired
};
render () {
const { intl, onClose, status } = this.props;
return (
2019-09-18 21:17:53 +01:00
<div className='modal-root__modal status-revisions-root'>
2019-09-17 16:23:51 +01:00
<div className='status-revisions'>
<div className='status-revisions__header'>
<h3 className='status-revisions__header__title'><FormattedMessage id='status_revisions.heading' defaultMessage='Revision History' /></h3>
<IconButton className='status-revisions__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={20} />
</div>
<div className='status-revisions__content'>
<StatusRevisionListContainer id={status.get('id')} />
</div>
</div>
</div>
);
}
}