From d0d799f911925fcbb4d68360546f0245b86334bb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 7 Nov 2016 18:23:36 +0100 Subject: Replace react-skylight with own solution that centers images better --- .../features/ui/containers/modal_container.jsx | 37 ++++++---------------- 1 file changed, 9 insertions(+), 28 deletions(-) (limited to 'app/assets/javascripts/components/features') diff --git a/app/assets/javascripts/components/features/ui/containers/modal_container.jsx b/app/assets/javascripts/components/features/ui/containers/modal_container.jsx index 323125e30..b6c022736 100644 --- a/app/assets/javascripts/components/features/ui/containers/modal_container.jsx +++ b/app/assets/javascripts/components/features/ui/containers/modal_container.jsx @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; -import { SkyLightStateless } from 'react-skylight'; import { closeModal } from '../../../actions/modal'; +import Lightbox from '../../../components/lightbox'; const mapStateToProps = state => ({ url: state.getIn(['modal', 'url']), @@ -17,30 +17,11 @@ const mapDispatchToProps = dispatch => ({ } }); -const styles = { - overlayStyles: { - - }, - - dialogStyles: { - width: '600px', - color: '#282c37', - fontSize: '16px', - lineHeight: '37px', - marginTop: '-300px', - left: '0', - right: '0', - marginLeft: 'auto', - marginRight: 'auto', - height: 'auto' - }, - - imageStyle: { - display: 'block', - maxWidth: '100%', - height: 'auto', - margin: '0 auto' - } +const imageStyle = { + display: 'block', + maxWidth: '100%', + height: 'auto', + margin: '0 auto' }; const Modal = React.createClass({ @@ -56,9 +37,9 @@ const Modal = React.createClass({ const { url, ...other } = this.props; return ( - - - + + + ); } -- cgit