mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
1ef45439d6
* test: relpace test case with test library * test: fix test case * test: replace snapshot Co-authored-by: 二货机器人 <smith3816@gmail.com>
10 lines
391 B
JavaScript
10 lines
391 B
JavaScript
import * as React from 'react';
|
|
import Trigger from 'rc-trigger/lib/mock';
|
|
import { TriggerMockContext } from '../shared/demoTestContext';
|
|
|
|
export default React.forwardRef((props, ref) => {
|
|
const mergedPopupVisible = React.useContext(TriggerMockContext) ?? props.popupVisible;
|
|
global.triggerProps = props;
|
|
return <Trigger {...props} ref={ref} popupVisible={mergedPopupVisible} />;
|
|
});
|