Skip to content
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

Tooltip component #180

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Tooltip component #180

merged 4 commits into from
Oct 25, 2024

Conversation

dafuga
Copy link
Contributor

@dafuga dafuga commented Oct 25, 2024

No description provided.

Copy link

cloudflare-workers-and-pages bot commented Oct 25, 2024

Deploying 2nicove with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2538499
Status: ✅  Deploy successful!
Preview URL: https://58f64383.unicove2.pages.dev
Branch Preview URL: https://tooltip-component.unicove2.pages.dev

View logs

Comment on lines +35 to +37
{#if children}
{@render children()}
{/if}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we default to an info icon if no children?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you can just do <Tooltip content="asdf" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍

<p>Tooltips provide additional information when hovering over an element.</p>
</div>

<div class="flex items-center space-x-4">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not sure these surrounding divs are contributing anything

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're absolutely right 😂 I no longer need those classes.

Comment on lines 35 to 42
<div class="flex items-center space-x-4">
<Tooltip
content="This is a long tooltip with an icon. Icons can be used to provide visual cues about the type of information being presented. For example, this icon might indicate that the tooltip contains important or critical information that the user should pay attention to."
icon={Info}
>
<span class="cursor-help underline">Tooltip with icon</span>
</Tooltip>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we add an example with an info icon as the trigger?

Copy link
Contributor

@deansallinen deansallinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dafuga dafuga merged commit ae8958f into dev Oct 25, 2024
3 of 4 checks passed
@dafuga dafuga deleted the tooltip-component branch October 25, 2024 20:11
deansallinen pushed a commit that referenced this pull request Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants