react-templates/test/data/test.rt.js

35 lines
1.4 KiB
JavaScript
Raw Normal View History

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