feat(v11): Popover

* 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
This commit is contained in:
Gregor Wassmann 2023-04-02 22:06:09 +02:00
commit d139d19524
13 changed files with 245 additions and 174 deletions

View file

@ -0,0 +1,24 @@
import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["span"];
export interface PopoverContentProps extends RestProps {
/**
* @default null
*/
className?: undefined;
/**
* @default {}
*/
contentProps?: {};
[key: `data-${string}`]: any;
}
export default class PopoverContent extends SvelteComponentTyped<
PopoverContentProps,
Record<string, any>,
{ default: {} }
> {}