import React from 'react'; import { ScrollView } from 'react-native'; import { StackNavigationOptions } from '@react-navigation/stack'; import { RouteProp } from '@react-navigation/native'; import I18n from '../i18n'; import { isIOS } from '../utils/deviceInfo'; import { themes } from '../lib/constants'; import { withTheme } from '../theme'; import { ChatsStackParamList } from '../stacks/types'; interface IMarkdownTableViewProps { route: RouteProp; theme: string; } class MarkdownTableView extends React.Component { static navigationOptions = (): StackNavigationOptions => ({ title: I18n.t('Table') }); render() { const { route, theme } = this.props; const renderRows = route.params?.renderRows; const tableWidth = route.params?.tableWidth; if (isIOS) { return ( {renderRows()} ); } return ( {renderRows()} ); } } export default withTheme(MarkdownTableView);