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