Skip to content

Commit fbe5d9b

Browse files
committed
update: visible参数名称变更为popupVisible
1 parent 0e485d3 commit fbe5d9b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ var propTypes = {
6767
delay: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.object]),
6868
getPopupContainer: _propTypes.default.func,
6969
getDocument: _propTypes.default.func,
70+
popup: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
7071
prefixCls: _propTypes.default.string,
7172
popupClassName: _propTypes.default.string,
7273
popupMaskClassName: _propTypes.default.string,
7374
defaultPopupVisible: _propTypes.default.bool,
75+
popupVisible: _propTypes.default.bool,
7476
popupProps: _propTypes.default.object,
7577
mask: _propTypes.default.bool,
7678
maskClosable: _propTypes.default.bool,
@@ -585,7 +587,7 @@ function (_React$Component) {
585587
key: "getDerivedStateFromProps",
586588
value: function getDerivedStateFromProps(props, state) {
587589
return {
588-
popupVisible: 'visible' in props ? props.visible : state.popupVisible
590+
popupVisible: 'popupVisible' in props ? props.popupVisible : state.popupVisible
589591
};
590592
}
591593
}]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-widget-trigger",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "trigger",
55
"main": "index.js",
66
"files": [

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const propTypes = {
3939
popupClassName: PropTypes.string,
4040
popupMaskClassName: PropTypes.string,
4141
defaultPopupVisible: PropTypes.bool,
42+
popupVisible: PropTypes.bool,
4243
popupProps: PropTypes.object,
4344
mask: PropTypes.bool,
4445
maskClosable: PropTypes.bool,
@@ -79,7 +80,7 @@ export default class Trigger extends React.Component {
7980

8081
static getDerivedStateFromProps(props, state) {
8182
return {
82-
popupVisible: 'visible' in props ? props.visible : state.popupVisible
83+
popupVisible: 'popupVisible' in props ? props.popupVisible : state.popupVisible
8384
}
8485
}
8586

0 commit comments

Comments
 (0)