2014-11-10 14:51:04 +01:00
|
|
|
define([
|
|
|
|
'react',
|
|
|
|
'lodash'
|
|
|
|
], function (React, _) {
|
2014-11-11 10:27:59 +01:00
|
|
|
'use strict';
|
2014-11-10 17:47:06 +01:00
|
|
|
return function () {
|
2014-11-12 09:48:22 +01:00
|
|
|
return React.DOM.div({}, React.DOM.div({
|
|
|
|
'style': {
|
|
|
|
position: 'relative',
|
|
|
|
textAlign: 'center',
|
|
|
|
top: this.props.config.previewTop,
|
|
|
|
height: this.props.config.previewHeight
|
|
|
|
}
|
|
|
|
}, React.DOM.div({
|
|
|
|
'style': {
|
|
|
|
margin: 'auto',
|
|
|
|
height: '100%',
|
|
|
|
width: this.props.config.previewWidth || '100%'
|
|
|
|
}
|
|
|
|
}, React.DOM.iframe({
|
|
|
|
'id': 'preview',
|
|
|
|
'src': 'http://localhost/sites/412?ds=true',
|
|
|
|
'style': {
|
|
|
|
width: '100%',
|
|
|
|
height: '100%',
|
|
|
|
border: '0'
|
|
|
|
}
|
|
|
|
}))), React.DOM.div({}, 'editor', !this.props.editorState.previewMode ? React.DOM.div({}, 'left bar') : null));
|
2014-11-10 17:47:06 +01:00
|
|
|
};
|
2014-11-12 09:48:22 +01:00
|
|
|
});
|