diff --git a/README.md b/README.md index b0ba168..c1aa45e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,9 @@ yarn add @untemps/svelte-use-tooltip position: 'right', animated: true, animationEnterClassName: 'tooltip-enter', - animationLeaveClassName: 'tooltip-leave', + animationLeaveClassName: 'tooltip-leave', + enterDelay: 200, + leaveDelay: 400, disabled: false } } class="tooltip__target"> @@ -102,18 +104,20 @@ yarn add @untemps/svelte-use-tooltip ## API -| Props | Type | Default | Description | -| -------------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------- | -| `content` | string | null | Text content to display in the tooltip. | -| `contentSelector` | string | null | Selector of the content to display in the tooltip. | -| `contentClone` | boolean | null | Flag to clone the content to display in the tooltip. If false, the content is removed from its previous parent. | -| `contentActions` | object | null | Configuration of the tooltip actions (see [Content Actions](#content-actions)). | -| `containerClassName` | string | null | Class name to apply to the tooltip container. | -| `position` | string | 'top' | Position of the tooltip. Available values: 'top', 'bottom', 'left', 'right' | -| `animated` | boolean | false | Flag to animate tooltip transitions. | -| `animationEnterClassName` | string | null | Class name to apply to the tooltip enter transition. | -| `animationLeaveClassName` | string | null | Class name to apply to the tooltip leave transition. | -| `disabled` | boolean | false | Flag to disable the tooltip content. | +| Props | Type | Default | Description | +|---------------------------|---------|---------|-----------------------------------------------------------------------------------------------------------------| +| `content` | string | null | Text content to display in the tooltip. | +| `contentSelector` | string | null | Selector of the content to display in the tooltip. | +| `contentClone` | boolean | null | Flag to clone the content to display in the tooltip. If false, the content is removed from its previous parent. | +| `contentActions` | object | null | Configuration of the tooltip actions (see [Content Actions](#content-actions)). | +| `containerClassName` | string | null | Class name to apply to the tooltip container. | +| `position` | string | 'top' | Position of the tooltip. Available values: 'top', 'bottom', 'left', 'right' | +| `animated` | boolean | false | Flag to animate tooltip transitions. | +| `animationEnterClassName` | string | null | Class name to apply to the tooltip enter transition. | +| `animationLeaveClassName` | string | null | Class name to apply to the tooltip leave transition. | +| `enterDelay` | number | 0 | Delay before showing the tooltip. | +| `leaveDelay` | number | 0 | Delay before hiding the tooltip. | +| `disabled` | boolean | false | Flag to disable the tooltip content. | ### Content Actions diff --git a/dev/src/App.svelte b/dev/src/App.svelte index 6996334..e1726c1 100644 --- a/dev/src/App.svelte +++ b/dev/src/App.svelte @@ -1,13 +1,15 @@