1*26ad19fcSEvan Bacon/** 2*26ad19fcSEvan Bacon * Copyright (c) 650 Industries. 3*26ad19fcSEvan Bacon * Copyright (c) Meta Platforms, Inc. and affiliates. 4*26ad19fcSEvan Bacon * 5*26ad19fcSEvan Bacon * This source code is licensed under the MIT license found in the 6*26ad19fcSEvan Bacon * LICENSE file in the root directory of this source tree. 7*26ad19fcSEvan Bacon */ 8*26ad19fcSEvan Baconimport React from 'react'; 9*26ad19fcSEvan Baconimport { StyleSheet, Text, View } from 'react-native'; 10*26ad19fcSEvan Bacon 11*26ad19fcSEvan Baconimport * as LogBoxStyle from '../UI/LogBoxStyle'; 12*26ad19fcSEvan Bacon 13*26ad19fcSEvan Bacontype Props = { 14*26ad19fcSEvan Bacon heading: string; 15*26ad19fcSEvan Bacon children: React.ReactNode; 16*26ad19fcSEvan Bacon action?: any; 17*26ad19fcSEvan Bacon}; 18*26ad19fcSEvan Bacon 19*26ad19fcSEvan Baconexport function LogBoxInspectorSection(props: Props) { 20*26ad19fcSEvan Bacon return ( 21*26ad19fcSEvan Bacon <View style={styles.section}> 22*26ad19fcSEvan Bacon <View style={styles.heading}> 23*26ad19fcSEvan Bacon <Text style={styles.headingText}>{props.heading}</Text> 24*26ad19fcSEvan Bacon {props.action} 25*26ad19fcSEvan Bacon </View> 26*26ad19fcSEvan Bacon <View style={styles.body}>{props.children}</View> 27*26ad19fcSEvan Bacon </View> 28*26ad19fcSEvan Bacon ); 29*26ad19fcSEvan Bacon} 30*26ad19fcSEvan Bacon 31*26ad19fcSEvan Baconconst styles = StyleSheet.create({ 32*26ad19fcSEvan Bacon section: { 33*26ad19fcSEvan Bacon marginTop: 15, 34*26ad19fcSEvan Bacon }, 35*26ad19fcSEvan Bacon heading: { 36*26ad19fcSEvan Bacon alignItems: 'center', 37*26ad19fcSEvan Bacon flexDirection: 'row', 38*26ad19fcSEvan Bacon paddingHorizontal: 12, 39*26ad19fcSEvan Bacon marginBottom: 10, 40*26ad19fcSEvan Bacon }, 41*26ad19fcSEvan Bacon headingText: { 42*26ad19fcSEvan Bacon color: LogBoxStyle.getTextColor(1), 43*26ad19fcSEvan Bacon flex: 1, 44*26ad19fcSEvan Bacon fontSize: 18, 45*26ad19fcSEvan Bacon fontWeight: '600', 46*26ad19fcSEvan Bacon includeFontPadding: false, 47*26ad19fcSEvan Bacon lineHeight: 20, 48*26ad19fcSEvan Bacon }, 49*26ad19fcSEvan Bacon body: { 50*26ad19fcSEvan Bacon paddingBottom: 10, 51*26ad19fcSEvan Bacon }, 52*26ad19fcSEvan Bacon}); 53