/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ import {RNTesterThemeContext} from './RNTesterTheme'; import RNTPressableRow from './RNTPressableRow'; import {memo} from 'react'; const RNTesterExampleFilter = require('./RNTesterExampleFilter'); const React = require('react'); const {SectionList, StyleSheet, Text, View} = require('react-native'); /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's * LTI update could not be added via codemod */ function ExampleModuleRow({ onShowUnderlay, onHideUnderlay, item, handlePress, }): React.Node { return ( handlePress({ exampleType: item.exampleType, key: item.key, title: item.module.title, }) } /> ); } const renderSectionHeader = ({section}: {section: any, ...}) => ( {theme => { return ( {section.title} ); }} ); const RNTesterModuleList: React.ComponentType = memo( ({sections, handleModuleCardPress}: any) => { const filter = ({example, filterRegex, category}: any) => filterRegex.test(example.module.title) && (!category || example.category === category); /* $FlowFixMe[missing-local-annot] The type annotation(s) required by * Flow's LTI update could not be added via codemod */ const renderListItem = ({item, section, separators}) => { return ( ); }; return ( ( } /> )} /> ); }, ); const styles = StyleSheet.create({ listContainer: { flex: 1, }, sectionHeader: { padding: 5, fontWeight: '500', fontSize: 11, }, topRowStyle: { flexDirection: 'row', justifyContent: 'space-between', flex: 1, }, imageViewStyle: { height: 30, width: 30, borderRadius: 15, justifyContent: 'center', alignItems: 'center', position: 'relative', bottom: 5, }, imageStyle: { height: 25, width: 25, }, }); module.exports = RNTesterModuleList;