mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
* Breaking changes * - The `Popover` now uses a different markup. The trigger becomes a child of the component. - The new `PopoverContent` becomes an additional child of the `Popover` component. - remove `relative` property
18 lines
353 B
Svelte
18 lines
353 B
Svelte
<script lang="ts">
|
|
import { Popover, PopoverContent } from "../types";
|
|
|
|
let open = false;
|
|
</script>
|
|
|
|
<Popover
|
|
bind:open
|
|
closeOnOutsideClick
|
|
align="right"
|
|
caret
|
|
highContrast
|
|
on:click:outside="{() => {
|
|
console.log('on:click:outside');
|
|
}}"
|
|
>
|
|
<PopoverContent style="padding: var(--bx-spacing-05)">Content</PopoverContent>
|
|
</Popover>
|