Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit 1c92936

Browse files
committed
fix: remove prop-types
1 parent 2d141fc commit 1c92936

File tree

4 files changed

+972
-943
lines changed

4 files changed

+972
-943
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
]
5252
},
5353
"dependencies": {
54-
"prop-types": "^15.6.2",
5554
"tippy.js": "^6.2.0"
5655
},
5756
"peerDependencies": {

rollup.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ const pluginReplaceEnvProduction = replace({
1212

1313
const COMMON_INPUT = {
1414
input: './src/index.js',
15-
external: [
16-
'react',
17-
'react-dom',
18-
'prop-types',
19-
'tippy.js',
20-
'tippy.js/headless',
21-
],
15+
external: ['react', 'react-dom', 'tippy.js', 'tippy.js/headless'],
2216
};
2317

2418
const COMMON_OUTPUT = {
@@ -28,7 +22,6 @@ const COMMON_OUTPUT = {
2822
globals: {
2923
react: 'React',
3024
'react-dom': 'ReactDOM',
31-
'prop-types': 'PropTypes',
3225
'tippy.js': 'tippy',
3326
'tippy.js/headless': 'tippy',
3427
},

src/Tippy.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, {cloneElement, useState} from 'react';
2-
import PropTypes from 'prop-types';
32
import {createPortal} from 'react-dom';
43
import {
54
preserveRef,
@@ -218,26 +217,5 @@ export default function TippyGenerator(tippy) {
218217
);
219218
}
220219

221-
if (process.env.NODE_ENV !== 'production') {
222-
const ContentType = PropTypes.oneOfType([
223-
PropTypes.number,
224-
PropTypes.string,
225-
PropTypes.element,
226-
]);
227-
228-
Tippy.propTypes = {
229-
children: PropTypes.element,
230-
content: PropTypes.oneOfType([
231-
ContentType,
232-
PropTypes.arrayOf(ContentType),
233-
]),
234-
render: PropTypes.func,
235-
visible: PropTypes.bool,
236-
disabled: PropTypes.bool,
237-
className: PropTypes.string,
238-
singleton: PropTypes.object,
239-
};
240-
}
241-
242220
return Tippy;
243221
}

0 commit comments

Comments
 (0)