mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
be7bbeda03
commit
e75be23a49
4 changed files with 22 additions and 2 deletions
|
@ -17,6 +17,12 @@
|
|||
*/
|
||||
export let danger = false;
|
||||
|
||||
/**
|
||||
* Set to `true` to prevent the modal from closing when clicking outside
|
||||
* @type {boolean} [preventCloseOnClickOutside=false]
|
||||
*/
|
||||
export let preventCloseOnClickOutside = false;
|
||||
|
||||
/**
|
||||
* Specify a class for the inner modal
|
||||
* @type {string} [containerClass=""]
|
||||
|
@ -104,7 +110,7 @@
|
|||
{...$$restProps}
|
||||
on:click
|
||||
on:click="{() => {
|
||||
if (!didClickInnerModal) open = false;
|
||||
if (!didClickInnerModal && !preventCloseOnClickOutside) open = false;
|
||||
didClickInnerModal = false;
|
||||
}}"
|
||||
on:mouseover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue