Skip to content

Commit

Permalink
onClose types
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed May 9, 2022
1 parent de1b7aa commit ab125af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('DocumentCreationFlyout', () => {
const wrapper = shallow(<DocumentCreationFlyout />);
expect(wrapper.find(EuiFlyout)).toHaveLength(1);

wrapper.find(EuiFlyout).prop('onClose')();
wrapper.find(EuiFlyout).prop('onClose')(new MouseEvent('click'));
expect(actions.closeDocumentCreation).toHaveBeenCalled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const FlyoutWithHigherZIndex = styled(EuiFlyout)`
z-index: ${(props) => props.theme.eui.euiZLevel5};
`;

interface Props extends EuiFlyoutProps {
interface Props extends Omit<EuiFlyoutProps, 'onClose'> {
onClose: (createdAgentPolicy?: AgentPolicy) => void;
}

Expand Down

0 comments on commit ab125af

Please sign in to comment.