mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
5a53d90003
Summary: Closes https://github.com/facebook/react-native/pull/6213 Differential Revision: D2989119 Pulled By: vjeux fb-gh-sync-id: 3a069dcebbf8dec40702a7bab5268ce4a82db731 shipit-source-id: 3a069dcebbf8dec40702a7bab5268ce4a82db731
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
* @providesModule PageLayout
|
|
*/
|
|
|
|
var React = require('React');
|
|
var Site = require('Site');
|
|
var Marked = require('Marked');
|
|
|
|
var support = React.createClass({
|
|
childContextTypes: {
|
|
permalink: React.PropTypes.string
|
|
},
|
|
|
|
getChildContext: function() {
|
|
return {permalink: this.props.metadata.permalink};
|
|
},
|
|
|
|
render: function() {
|
|
var metadata = this.props.metadata;
|
|
var content = this.props.children;
|
|
return (
|
|
<Site section={metadata.section} title={metadata.title}>
|
|
<section className="content wrap documentationContent nosidebar">
|
|
<div className="inner-content">
|
|
<Marked>{content}</Marked>
|
|
</div>
|
|
</section>
|
|
</Site>
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = support;
|