Closed loiclaudet closed 1 year ago
Thanks for your testing code!
Unfortunately, even if I set the .my-custom-class-name { width: 100px; }
on home.css
, the width is still the same as origin. Is it normal ? Look like we can't set the container 😊
Unfortunately, even if I set the
.my-custom-class-name { width: 100px; }
onhome.css
, the width is still the same as origin. Is it normal ? Look like we can't set the container 😊
@Yoj16 thank you for your feedback!
The component updates dynamically the width
of the content using custom properties:
Thus it takes precedence on the width
defined in my-custom-classname
:
However you can rely on max-width
property to limit the tooltip to the size you want, that takes precedence on any width
property.
I think it's not user friendly that the users's width set in the content className isn't applied because of the radix priority.
@lolottetheclash thanks for your feedback.
In order to improve component usage, tooltip content CSS class has been updated, by replacing width
by max-width
. Thus, user can define a width
from contentClassName
, that overrides dynamic width provided by Radix CSS custom property, --radix-tooltip-content-available-width
.
Also, a width
props has been added to the component props, providing another level of customization.
Hope these changes are sufficient to provide enough flexibility and make this component easier to customize.
Purpose
The Tooltip component is a reusable component used in various area of the application, such as share data payment (step 5).
Testing from home page
update the
home.tsx
file as follow:Overview from Figma