mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(popover): add closeOnOutsideClick prop
This commit is contained in:
parent
4397d852eb
commit
b728454a60
6 changed files with 81 additions and 12 deletions
20
tests/Popover.test.svelte
Normal file
20
tests/Popover.test.svelte
Normal file
|
@ -0,0 +1,20 @@
|
|||
<script lang="ts">
|
||||
import { Popover } from "../types";
|
||||
|
||||
let open = false;
|
||||
</script>
|
||||
|
||||
<Popover
|
||||
bind:open
|
||||
closeOnOutsideClick
|
||||
align="right"
|
||||
caret
|
||||
relative
|
||||
light
|
||||
highContrast
|
||||
on:click:outside="{() => {
|
||||
console.log('on:click:outside');
|
||||
}}"
|
||||
>
|
||||
<div style="padding: var(--cds-spacing-05)">Content</div>
|
||||
</Popover>
|
Loading…
Add table
Add a link
Reference in a new issue