From fd56e4dd2967bfbc2db5d4db78cdd71574272479 Mon Sep 17 00:00:00 2001 From: Philip Jackson Date: Fri, 24 Jan 2020 07:16:37 +1300 Subject: [PATCH] @wordpress/components: Add isDismissible prop to (#41800) The isDismissible spelling has replaced isDismissable (with an "a"). The old spelling has been left where it is to avoid breaking builds, however it has been marked as deprecated in the JSDoc. Added a test for the prop in wordpress__components-tests.tsx. --- types/wordpress__components/modal/index.d.ts | 7 +++++++ .../wordpress__components/wordpress__components-tests.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/wordpress__components/modal/index.d.ts b/types/wordpress__components/modal/index.d.ts index 08685d8e4b..6c0aacfd48 100644 --- a/types/wordpress__components/modal/index.d.ts +++ b/types/wordpress__components/modal/index.d.ts @@ -46,8 +46,15 @@ declare namespace Modal { * If this property is set to false, the modal will not display a close * icon and cannot be dismissed. * @defaultValue true + * @deprecated Use isDismissible */ isDismissable?: boolean; + /** + * If this property is set to false, the modal will not display a close + * icon and cannot be dismissed. + * @defaultValue true + */ + isDismissible?: boolean; /** * If this property is added, it will an additional class name to the * modal overlay div. diff --git a/types/wordpress__components/wordpress__components-tests.tsx b/types/wordpress__components/wordpress__components-tests.tsx index 93d40f58e6..3cf109cf52 100644 --- a/types/wordpress__components/wordpress__components-tests.tsx +++ b/types/wordpress__components/wordpress__components-tests.tsx @@ -407,7 +407,7 @@ const kbshortcuts = { // // modal // - console.log('closing modal')}> + console.log('closing modal')}> ;