1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/components/ascribe_app.js

35 lines
820 B
JavaScript
Raw Normal View History

'use strict';
2015-05-13 16:26:12 +02:00
import React from 'react';
import AppBase from './app_base';
import Header from './header';
2015-05-15 15:38:25 +02:00
2015-05-18 18:00:12 +02:00
2015-05-20 12:00:16 +02:00
let AscribeApp = React.createClass({
propTypes: {
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element),
React.PropTypes.element
])
},
2015-05-18 18:00:12 +02:00
render() {
const { children, routes } = this.props;
2015-05-18 18:00:12 +02:00
return (
<div className="ascribe-default-app">
2015-10-06 10:20:36 +02:00
<Header routes={routes} />
<div className="container ascribe-body">
{/* Routes are injected here */}
{children}
2015-10-09 02:00:02 +02:00
</div>
</div>
2015-05-18 18:00:12 +02:00
);
}
2015-05-20 12:00:16 +02:00
});
2015-05-13 16:26:12 +02:00
export default AppBase(AscribeApp);