2015-02-20 04:10:52 +00:00
|
|
|
/**
|
2016-07-12 12:51:57 +00:00
|
|
|
* Copyright (c) 2013-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.
|
|
|
|
*
|
2015-03-28 05:18:47 +00:00
|
|
|
* The examples provided by Facebook are for non-commercial testing and
|
|
|
|
* evaluation purposes only.
|
2015-03-23 20:35:08 +00:00
|
|
|
*
|
2015-03-28 05:18:47 +00:00
|
|
|
* Facebook reserves all rights not expressly granted.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2015-02-20 04:10:52 +00:00
|
|
|
*
|
|
|
|
* @providesModule createExamplePage
|
2015-03-24 20:25:39 +00:00
|
|
|
* @flow
|
2015-02-20 04:10:52 +00:00
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2016-09-02 21:42:38 +00:00
|
|
|
const React = require('react');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2016-09-02 21:42:38 +00:00
|
|
|
const UIExplorerExampleContainer = require('./UIExplorerExampleContainer');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2016-10-16 17:59:04 +00:00
|
|
|
import type { ExampleModule } from 'ExampleTypes';
|
2015-03-24 20:25:39 +00:00
|
|
|
|
|
|
|
var createExamplePage = function(title: ?string, exampleModule: ExampleModule)
|
2016-03-08 20:38:52 +00:00
|
|
|
: ReactClass<any> {
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2016-07-26 08:00:02 +00:00
|
|
|
class ExamplePage extends React.Component {
|
|
|
|
render() {
|
2016-09-02 21:42:38 +00:00
|
|
|
return <UIExplorerExampleContainer module={exampleModule} title={title} />;
|
2015-02-20 04:10:52 +00:00
|
|
|
}
|
2016-07-26 08:00:02 +00:00
|
|
|
}
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
return ExamplePage;
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = createExamplePage;
|