mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46: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
8
types/Popover/Popover.d.ts
vendored
8
types/Popover/Popover.d.ts
vendored
|
@ -9,6 +9,12 @@ export interface PopoverProps
|
|||
*/
|
||||
open?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to close the popover on an outside click
|
||||
* @default false
|
||||
*/
|
||||
closeOnOutsideClick?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` render a caret
|
||||
* @default false
|
||||
|
@ -54,6 +60,6 @@ export interface PopoverProps
|
|||
|
||||
export default class Popover extends SvelteComponentTyped<
|
||||
PopoverProps,
|
||||
{},
|
||||
{ ["click:outside"]: CustomEvent<any> },
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue