2018-12-21 04:01:27 +00:00
|
|
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
|
|
import React from 'react';
|
2019-03-21 16:38:29 +00:00
|
|
|
|
|
|
|
import { connect } from '../../../redux';
|
2018-12-21 04:01:27 +00:00
|
|
|
import AbstractDialogContainer, {
|
|
|
|
abstractMapStateToProps
|
|
|
|
} from '../AbstractDialogContainer';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a DialogContainer responsible for showing all dialogs. Necessary
|
|
|
|
* for supporting @atlaskit's modal animations.
|
|
|
|
*
|
|
|
|
* @extends AbstractDialogContainer
|
|
|
|
*/
|
|
|
|
class DialogContainer extends AbstractDialogContainer {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
2020-05-20 08:25:31 +00:00
|
|
|
if (this.props._rawDialog) {
|
|
|
|
return this._renderDialogContent();
|
|
|
|
}
|
|
|
|
|
2018-12-21 04:01:27 +00:00
|
|
|
return (
|
|
|
|
<ModalTransition>
|
|
|
|
{ this._renderDialogContent() }
|
|
|
|
</ModalTransition>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(abstractMapStateToProps)(DialogContainer);
|
|
|
|
|