Skip to content

Commit 0b3d28f

Browse files
Luna Weifacebook-github-bot
Luna Wei
authored andcommitted
Move multicolumn out to separate example
Summary: Changelog: [Internal] Refactor FlatList examples, move multi-column under FlatList index Reviewed By: charlesbdudley Differential Revision: D30816719 fbshipit-source-id: 3fb9a30ddb58ca302a1b1b5a23ea964f3793b836
1 parent 3063047 commit 0b3d28f

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

packages/rn-tester/js/examples/MultiColumn/MultiColumnExample.js packages/rn-tester/js/examples/FlatList/FlatList-multiColumn.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
'use strict';
12+
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
1213
const RNTesterPage = require('../../components/RNTesterPage');
1314
const React = require('react');
1415

@@ -204,14 +205,9 @@ const styles = StyleSheet.create({
204205
},
205206
});
206207

207-
exports.title = 'FlatList - MultiColumn';
208-
exports.category = 'ListView';
209-
exports.description = 'Performant, scrollable grid of data.';
210-
exports.examples = [
211-
{
212-
title: 'Simple flat list multi column',
213-
render: function(): React.Element<typeof MultiColumnExample> {
214-
return <MultiColumnExample />;
215-
},
216-
},
217-
];
208+
export default ({
209+
title: 'MultiColumn',
210+
name: 'multicolumn',
211+
description: 'Performant, scrollable grid of data',
212+
render: () => <MultiColumnExample />,
213+
}: RNTesterModuleExample);

packages/rn-tester/js/examples/FlatList/FlatListExampleIndex.js

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import ContentInsetExample from './FlatList-contentInset';
1515
import InvertedExample from './FlatList-inverted';
1616
import onViewableItemsChangedExample from './FlatList-onViewableItemsChanged';
1717
import WithSeparatorsExample from './FlatList-withSeparators';
18+
import MultiColumnExample from './FlatList-multiColumn';
1819

1920
export default ({
2021
framework: 'React',
@@ -30,5 +31,6 @@ export default ({
3031
InvertedExample,
3132
onViewableItemsChangedExample,
3233
WithSeparatorsExample,
34+
MultiColumnExample,
3335
],
3436
}: RNTesterModule);

packages/rn-tester/js/utils/RNTesterList.android.js

-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ const Components: Array<RNTesterModuleInfo> = [
4747
category: 'UI',
4848
module: require('../examples/Modal/ModalExample'),
4949
},
50-
{
51-
key: 'MultiColumnExample',
52-
category: 'ListView',
53-
module: require('../examples/MultiColumn/MultiColumnExample'),
54-
},
5550
{
5651
key: 'NewAppScreenExample',
5752
module: require('../examples/NewAppScreen/NewAppScreenExample'),

packages/rn-tester/js/utils/RNTesterList.ios.js

-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ const Components: Array<RNTesterModuleInfo> = [
6161
module: require('../examples/Modal/ModalExample'),
6262
supportsTVOS: true,
6363
},
64-
{
65-
key: 'MultiColumnExample',
66-
module: require('../examples/MultiColumn/MultiColumnExample'),
67-
supportsTVOS: true,
68-
},
6964
{
7065
key: 'NewAppScreenExample',
7166
module: require('../examples/NewAppScreen/NewAppScreenExample'),

0 commit comments

Comments
 (0)