Skip to content

Commit

Permalink
Merge pull request #44 from InjectiveLabs/chore/tooltip-attrs
Browse files Browse the repository at this point in the history
chore: tooltip attrs
  • Loading branch information
bangjelkoski authored Jan 11, 2024
2 parents 345c71d + 61a8118 commit 99af6d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui-shared/lib/components/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Tooltip } from 'floating-vue'
</script>

<template>
<Tooltip>
<Tooltip v-bind="$attrs">
<div>
<slot />
</div>
Expand Down
10 changes: 10 additions & 0 deletions packages/ui-shared/playground/story/Tooltip.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
<div class="max-w-[240px] p-2 text-sm">Random tooltip string</div>
</template>
</BaseTooltip>

<BaseTooltip class="inline-block" v-bind="{ delay: { hide: 2000 } }">
<BaseIcon name="circle-info" class="min-w-4 w-4 text-gray-600" />

<template #content>
<div class="max-w-[240px] p-2 text-sm">
Random tooltip string With Hide Delay
</div>
</template>
</BaseTooltip>
</div>
</Story>
</template>

0 comments on commit 99af6d4

Please sign in to comment.