mirror of
https://github.com/cupcakearmy/svelte-hint.git
synced 2024-12-24 08:56:28 +00:00
make inline block
This commit is contained in:
parent
85d1887bbb
commit
45513ec72c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "svelte-hint",
|
||||
"version": "1.0.0-rc.5",
|
||||
"version": "1.0.0-rc.6",
|
||||
"description": "Tooltip library for svelte",
|
||||
"author": {
|
||||
"name": "Niccolo Borgioli",
|
||||
|
@ -12,8 +12,8 @@
|
||||
export let offset: Parameters<typeof offsetMiddleware>[0] = 4
|
||||
export let auto: boolean | 'start' | 'end' = false
|
||||
|
||||
let trigger: HTMLSpanElement | null = null
|
||||
let hint: HTMLSpanElement | null = null
|
||||
let trigger: HTMLDivElement | null = null
|
||||
let hint: HTMLDivElement | null = null
|
||||
let dataShow = false
|
||||
let id = ''
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<div bind:this={trigger} aria-describedby={id}>
|
||||
<div bind:this={trigger} aria-describedby={id} class="wrapper">
|
||||
<slot />
|
||||
</div>
|
||||
<div bind:this={hint} {id} data-show={dataShow} role="tooltip" class="svelte-hint-tooltip">
|
||||
@ -72,6 +72,9 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.wrapper {
|
||||
display: inline-block;
|
||||
}
|
||||
.svelte-hint-tooltip {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
Loading…
Reference in New Issue
Block a user