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
2016-01-19 15:16:12 +01:00

35 lines
820 B
JavaScript

'use strict';
import React from 'react';
import AppBase from './app_base';
import Header from './header';
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
])
},
render() {
const { children, routes } = this.props;
return (
<div className="ascribe-default-app">
<Header routes={routes} />
<div className="container ascribe-body">
{/* Routes are injected here */}
{children}
</div>
</div>
);
}
});
export default AppBase(AscribeApp);