Skip to content

Commit 88f1d56

Browse files
committed
Remove propTypes
1 parent cbba152 commit 88f1d56

File tree

4 files changed

+2
-58
lines changed

4 files changed

+2
-58
lines changed

packages/heuristic-table-plugin/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@
6161
"typescript": "~4.4.2"
6262
},
6363
"dependencies": {
64-
"@types/prop-types": "^15.7.4",
6564
"@types/ramda": "^0.27.44",
66-
"prop-types": "^15.7.2",
6765
"ramda": "^0.27.1"
6866
},
6967
"peerDependencies": {

packages/iframe-plugin/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@
6262
},
6363
"dependencies": {
6464
"@formidable-webview/webshell": "^2.6.0",
65-
"@native-html/plugins-core": "workspace:*",
66-
"@types/prop-types": "^15.7.4",
67-
"prop-types": "^15.7.2"
65+
"@native-html/plugins-core": "workspace:*"
6866
},
6967
"peerDependencies": {
7068
"react": ">= 16.8.0",

packages/table-plugin/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@
6666
},
6767
"dependencies": {
6868
"@formidable-webview/webshell": "2.6.0",
69-
"@native-html/plugins-core": "workspace:*",
70-
"@types/prop-types": "^15.7.4",
71-
"prop-types": "^15.7.2"
69+
"@native-html/plugins-core": "workspace:*"
7270
},
7371
"peerDependencies": {
7472
"react": ">= 16.8.0",

packages/table-plugin/src/HTMLTable.tsx

-50
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useMemo, useRef, useLayoutEffect, useCallback } from 'react';
2-
import PropTypes from 'prop-types';
32
import {
43
Platform,
54
StyleSheet,
@@ -50,30 +49,6 @@ function animateNextFrames(duration?: number) {
5049
});
5150
}
5251

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-
7752
function findHeight({
7853
computeContainerHeight,
7954
computeHeuristicContentHeight,
@@ -309,28 +284,3 @@ export const HTMLTable = function HTMLTable({
309284
</Animated.View>
310285
);
311286
};
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

Comments
 (0)