|
1 | 1 | import React, { useMemo, useRef, useLayoutEffect, useCallback } from 'react'; |
2 | | -import PropTypes from 'prop-types'; |
3 | 2 | import { |
4 | 3 | Platform, |
5 | 4 | StyleSheet, |
@@ -50,30 +49,6 @@ function animateNextFrames(duration?: number) { |
50 | 49 | }); |
51 | 50 | } |
52 | 51 |
|
53 | | -const tableStylePropTypeSpec: Record<keyof TableStyleSpecs, any> = { |
54 | | - linkColor: PropTypes.string, |
55 | | - fontFamily: PropTypes.string, |
56 | | - fontSizePx: PropTypes.number, |
57 | | - tdBorderColor: PropTypes.string, |
58 | | - thBorderColor: PropTypes.string, |
59 | | - trOddBackground: PropTypes.string, |
60 | | - trOddColor: PropTypes.string, |
61 | | - trEvenBackground: PropTypes.string, |
62 | | - trEvenColor: PropTypes.string, |
63 | | - rowsBorderWidthPx: PropTypes.number, |
64 | | - columnsBorderWidthPx: PropTypes.number, |
65 | | - outerBorderColor: PropTypes.string, |
66 | | - outerBorderWidthPx: PropTypes.number, |
67 | | - cellPaddingEm: PropTypes.number, |
68 | | - fitContainerWidth: PropTypes.bool, |
69 | | - fitContainerHeight: PropTypes.bool, |
70 | | - selectableText: PropTypes.bool, |
71 | | - thEvenBackground: PropTypes.string, |
72 | | - thEvenColor: PropTypes.string, |
73 | | - thOddBackground: PropTypes.string, |
74 | | - thOddColor: PropTypes.string |
75 | | -}; |
76 | | - |
77 | 52 | function findHeight({ |
78 | 53 | computeContainerHeight, |
79 | 54 | computeHeuristicContentHeight, |
@@ -309,28 +284,3 @@ export const HTMLTable = function HTMLTable({ |
309 | 284 | </Animated.View> |
310 | 285 | ); |
311 | 286 | }; |
312 | | - |
313 | | -const propTypes: Record<keyof HTMLTableProps, any> = { |
314 | | - animationDuration: PropTypes.number.isRequired, |
315 | | - animationType: PropTypes.oneOf(['none', 'animated', 'layout']), |
316 | | - computeContainerHeight: PropTypes.func.isRequired, |
317 | | - computeHeuristicContentHeight: PropTypes.func.isRequired, |
318 | | - html: PropTypes.string.isRequired, |
319 | | - numOfChars: PropTypes.number.isRequired, |
320 | | - numOfColumns: PropTypes.number.isRequired, |
321 | | - numOfRows: PropTypes.number.isRequired, |
322 | | - WebView: PropTypes.elementType.isRequired, |
323 | | - onLinkPress: PropTypes.func, |
324 | | - style: PropTypes.any, |
325 | | - tableStyleSpecs: PropTypes.shape(tableStylePropTypeSpec), |
326 | | - cssRules: PropTypes.string, |
327 | | - webViewProps: PropTypes.object, |
328 | | - sourceBaseUrl: PropTypes.string, |
329 | | - maxScale: PropTypes.number.isRequired, |
330 | | - htmlAttribs: PropTypes.any, |
331 | | - displayMode: PropTypes.oneOf(['flex', 'expand']) |
332 | | -}; |
333 | | - |
334 | | -Object.defineProperty(HTMLTable, 'propTypes', { |
335 | | - value: propTypes |
336 | | -}); |
0 commit comments