svelte-popperjs
Advanced tools
Comparing version 1.2.8 to 1.2.9
import { Instance, OptionsGeneric, Modifier } from '@popperjs/core'; | ||
export declare type PopperOptions<TModifier> = Partial<OptionsGeneric<TModifier>> | undefined; | ||
export declare type ReferenceAction = (node: HTMLElement) => { | ||
export declare type ReferenceAction = (node: Element) => { | ||
destroy(): void; | ||
@@ -5,0 +5,0 @@ }; |
{ | ||
"name": "svelte-popperjs", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "Popper for Svelte with actions, no wrapper components required!", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -39,4 +39,7 @@ ![svelte-popperjs-banner](https://user-images.githubusercontent.com/42545742/102723166-49801c80-4341-11eb-8067-ebc66fdd47f4.png) | ||
import { createPopperActions } from 'svelte-popperjs'; | ||
const [popperRef, popperContent] = createPopperActions(); | ||
const popperOptions = { | ||
const [popperRef, popperContent] = createPopperActions({ | ||
placement: 'right', | ||
strategy: 'fixed', | ||
}); | ||
const extraOpts = { | ||
modifiers: [ | ||
@@ -58,3 +61,3 @@ { name: 'offset', options: { offset: [0, 8] } } | ||
{#if showTooltip} | ||
<div id="tooltip" use:popperContent={popperOptions}> | ||
<div id="tooltip" use:popperContent={extraOpts}> | ||
My tooltip | ||
@@ -61,0 +64,0 @@ <div id="arrow" data-popper-arrow /> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11154
101