Skip to content

[Tooltip] Some issue about Tooltip when using with "slot" #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KiddoV opened this issue Apr 10, 2025 · 0 comments
Open

[Tooltip] Some issue about Tooltip when using with "slot" #514

KiddoV opened this issue Apr 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@KiddoV
Copy link

KiddoV commented Apr 10, 2025

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

  1. Typescript would yell for label props when using Tooltip with a slot:
<Tooltip opened position="left" withArrow>
    <div slot="label">Some text...</div>
</Tooltip>

VsCode yells:

Property 'label' is missing in type '{ opened: true; position: "left"; withArrow: true; }' but required in type '{ class?: string; label: any; opened?: boolean; openDelay?: number; closeDelay?: number; color?: SvelteUIColor; radius?: SvelteUINumberSize; disabled?: boolean; ... 243 more ...; 'on:fullscreenerror'?: EventHandler<...>; }'.ts(2741)
  1. The position is broken when using tooltip with slot
<Tooltip opened position="left" withArrow> <!-- <== Cannot change position of the tooltip anymore, it would always on the right side -->
    <div slot="label">Text...</div>
    <div></div>
</Tooltip>

In which browser(s) did the problem occur?

Microsoft Edge Beta/Dev/Canary

Steps To Reproduce

N/A

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

No

Relevant Assets

No response

@KiddoV KiddoV added the bug Something isn't working label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant