diff --git a/app/views/MarkdownTableView.js b/app/views/MarkdownTableView.tsx similarity index 63% rename from app/views/MarkdownTableView.js rename to app/views/MarkdownTableView.tsx index a95118d3..a65994ee 100644 --- a/app/views/MarkdownTableView.js +++ b/app/views/MarkdownTableView.tsx @@ -1,22 +1,26 @@ import React from 'react'; import { ScrollView } from 'react-native'; -import PropTypes from 'prop-types'; +import { StackNavigationOptions } from '@react-navigation/stack'; +import { RouteProp } from '@react-navigation/native'; import I18n from '../i18n'; import { isIOS } from '../utils/deviceInfo'; import { themes } from '../constants/colors'; import { withTheme } from '../theme'; -class MarkdownTableView extends React.Component { - static navigationOptions = () => ({ +interface IMarkdownTableViewProps { + route: RouteProp< + { MarkdownTableView: { renderRows: (drawExtraBorders?: boolean) => JSX.Element; tableWidth: number } }, + 'MarkdownTableView' + >; + theme: string; +} + +class MarkdownTableView extends React.Component { + static navigationOptions = (): StackNavigationOptions => ({ title: I18n.t('Table') }); - static propTypes = { - route: PropTypes.object, - theme: PropTypes.string - }; - render() { const { route, theme } = this.props; const renderRows = route.params?.renderRows;