2015-02-19 20:10:52 -08:00
|
|
|
/**
|
2016-07-12 05:51:57 -07: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-27 22:18:47 -07:00
|
|
|
* The examples provided by Facebook are for non-commercial testing and
|
|
|
|
* evaluation purposes only.
|
2015-03-23 13:35:08 -07:00
|
|
|
*
|
2015-03-27 22:18:47 -07: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-19 20:10:52 -08:00
|
|
|
*
|
|
|
|
* @providesModule createExamplePage
|
2015-03-24 13:25:39 -07:00
|
|
|
* @flow
|
2015-02-19 20:10:52 -08:00
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2016-09-02 14:42:38 -07:00
|
|
|
const React = require('react');
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2016-09-02 14:42:38 -07:00
|
|
|
const UIExplorerExampleContainer = require('./UIExplorerExampleContainer');
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2016-10-16 10:59:04 -07:00
|
|
|
import type { ExampleModule } from 'ExampleTypes';
|
2015-03-24 13:25:39 -07:00
|
|
|
|
|
|
|
var createExamplePage = function(title: ?string, exampleModule: ExampleModule)
|
2016-03-08 12:38:52 -08:00
|
|
|
: ReactClass<any> {
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2016-07-26 01:00:02 -07:00
|
|
|
class ExamplePage extends React.Component {
|
|
|
|
render() {
|
2016-09-02 14:42:38 -07:00
|
|
|
return <UIExplorerExampleContainer module={exampleModule} title={title} />;
|
2015-02-19 20:10:52 -08:00
|
|
|
}
|
2016-07-26 01:00:02 -07:00
|
|
|
}
|
2015-02-19 20:10:52 -08:00
|
|
|
|
|
|
|
return ExamplePage;
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = createExamplePage;
|