diff --git a/src-docs/src/views/call_out/info.js b/src-docs/src/views/call_out/info.js index 2afe71e4df..1cae19f035 100644 --- a/src-docs/src/views/call_out/info.js +++ b/src-docs/src/views/call_out/info.js @@ -26,7 +26,7 @@ export default () => { title="Callouts can be dismissed when dismissible is set to true unless the color is danger or warning. " iconType="wrench" dismissible - onDismissible={closeCallOut} + onDismiss={closeCallOut} /> ); } diff --git a/src/components/call_out/__snapshots__/call_out.test.tsx.snap b/src/components/call_out/__snapshots__/call_out.test.tsx.snap index 89a412f4ca..6043f67923 100644 --- a/src/components/call_out/__snapshots__/call_out.test.tsx.snap +++ b/src/components/call_out/__snapshots__/call_out.test.tsx.snap @@ -45,7 +45,7 @@ exports[`OuiCallOut props color warning is rendered 1`] = ` exports[`OuiCallOut props dismissible close callout after click 1`] = `
{ }); it('close callout after click', () => { - const onDismissible = jest.fn(); + const onDismiss = jest.fn(); const component = mount( ); expect(component).toMatchSnapshot(); findTestSubject(component, 'closeCallOutButton').simulate('click'); - expect(onDismissible).toBeCalled(); + expect(onDismiss).toBeCalled(); }); }); }); diff --git a/src/components/call_out/call_out.tsx b/src/components/call_out/call_out.tsx index 24b796e89d..d91e33a783 100644 --- a/src/components/call_out/call_out.tsx +++ b/src/components/call_out/call_out.tsx @@ -50,7 +50,7 @@ export type OuiCallOutProps = CommonProps & size?: Size; heading?: Heading; dismissible?: boolean; - onDismissible?: ( + onDismiss?: ( event?: | React.KeyboardEvent | React.MouseEvent @@ -83,7 +83,7 @@ export const OuiCallOut = forwardRef( className, heading, dismissible = false, - onDismissible = () => {}, + onDismiss = () => {}, ...rest }, ref: Ref @@ -114,7 +114,7 @@ export const OuiCallOut = forwardRef( dismissibleIcon = (