Closed dennismphil closed 2 years ago
Can you use class
in the Tooltip component:
<script>
import { Tooltip, Button } from 'flowbite-svelte';
</script>
<div class="p-24" >
<Tooltip content="Tooltip content" class="text-red-700">
<Button>Default tooltip</Button>
</Tooltip>
</div>
Thanks for the detailed demo on stackblitz.
The documentation is missing the class
property
I attempted using the class
, but the classes rarely work due to conflicts and not being applied to the correct containers. Examples are noted below
I updated the Tooltip component, v0.22.30. You can find the doc at https://flowbite-svelte.com/tooltips#Custom_style. Let me know what you think.
Tested and this works like magic. Thank you.
Only a minor nit in the documentation .. Would be perfect if tipClass
and tipColor
is listed in the documentation here as well
Yes, I will update the props. Thanks.
Summary
A brief explanation of the feature.
Can we please add the ability to customize the tooltip?
Basic example
If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable.
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
The z-index of other absolute positioned elements in the application interferes with the default z-index given. By giving the flexibility to customize the class of the tooltip elements, we solve this problem. Also, this provides developers to customize the font size, color, and allow for custom styling