forked from coracle/flotilla
Fix tippy falling off the page
This commit is contained in:
@@ -362,6 +362,12 @@
|
|||||||
@apply !h-full !w-full !rounded-lg !border-none !bg-inherit !px-4 !text-inherit;
|
@apply !h-full !w-full !rounded-lg !border-none !bg-inherit !px-4 !text-inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tippy popover */
|
||||||
|
|
||||||
|
.tippy-box {
|
||||||
|
@apply shadow-xl;
|
||||||
|
}
|
||||||
|
|
||||||
/* emoji picker */
|
/* emoji picker */
|
||||||
|
|
||||||
emoji-picker {
|
emoji-picker {
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<EmojiButton {onEmoji} class="btn join-item btn-xs">
|
<EmojiButton {onEmoji} class="btn join-item btn-xs" tippyParams={{placement: "bottom-end"}}>
|
||||||
<Icon icon={SmileCircle} size={4} />
|
<Icon icon={SmileCircle} size={4} />
|
||||||
</EmojiButton>
|
</EmojiButton>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import Tippy from "@lib/components/Tippy.svelte"
|
import Tippy from "@lib/components/Tippy.svelte"
|
||||||
import EmojiPicker from "@lib/components/EmojiPicker.svelte"
|
import EmojiPicker from "@lib/components/EmojiPicker.svelte"
|
||||||
|
|
||||||
const {...props} = $props()
|
const {tippyParams = {}, ...props} = $props()
|
||||||
|
|
||||||
const open = () => popover?.show()
|
const open = () => popover?.show()
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
bind:popover
|
bind:popover
|
||||||
component={EmojiPicker}
|
component={EmojiPicker}
|
||||||
props={{onClick}}
|
props={{onClick}}
|
||||||
params={{trigger: "manual", interactive: true}}>
|
params={{trigger: "manual", interactive: true, ...tippyParams}}>
|
||||||
<Button onclick={open} class={props.class}>
|
<Button onclick={open} class={props.class}>
|
||||||
{@render props.children?.()}
|
{@render props.children?.()}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user