import React, { useState } from 'react'; import { StyleSheet, View } from 'react-native'; import { Table, TableWrapper, Col, Rows } from 'react-native-tabeller'; export const ExampleFive: React.FC = () => { const [sideHead] = useState(['H1', 'H2']); const [rowTitles] = useState([ 'Title', 'Title2', 'Title3', 'Title4', ]); // Table data - matching the structure in the screenshot const [tableData] = useState([ ['a', '1', 'a'], ['b', '2', 'b'], ['c', '3', 'c'], ['d', '4', 'd'], ]); return ( {/* left column with H1, H2 */} {/* row titles column */} {/* content cells */}
); }; const styles = StyleSheet.create({ container: { flex: 1, padding: 16, paddingTop: 30, backgroundColor: '#fff', }, header: { height: 50, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, headerText: { textAlign: 'center', fontWeight: '500', }, wrapper: { flexDirection: 'row', }, sideHeader: { width: 60, backgroundColor: '#C6F3E0', }, sideHeaderText: { textAlign: 'center', fontWeight: '500', }, tableContentWrapper: { flex: 1, flexDirection: 'row', }, title: { width: 80, backgroundColor: '#f6f8fa', }, titleText: { textAlign: 'left', paddingLeft: 5, }, row: { height: 30, }, text: { textAlign: 'center', }, btn: { width: 58, height: 30, backgroundColor: '#c8e1ff', borderRadius: 2, justifyContent: 'center', alignItems: 'center', }, btnText: { textAlign: 'center', fontSize: 12, }, centered: { justifyContent: 'center', alignItems: 'center', }, }); export default ExampleFive;