-
Notifications
You must be signed in to change notification settings - Fork 86
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
made KTooltip's width configurable #611
made KTooltip's width configurable #611
Conversation
@MisRob please take a look. |
Thanks @satyamkale27, as mentioned in the issue I think this implementation is an option if the preferred API
is not feasible for some reason. Could you elaborate if you've explored it and what were the blockers? |
@MisRob I have not yet explored an alternative approach to it, but I could. correct me if I am wrong, means we don't want max-width set inline like here in this code snippet |
Thank you @satyamkale27. The difference between the two options is that in the first one I suggest we explore first, max width is set via the standard CSS If it doesn't seem to be feasible, we could add a new prop |
thanks for explaning I got it now, soon I will make new commit. |
@MisRob I made a new commit which will allow max-width to run but there is a problem in it, i cant use the style prop because "style" is a reserved attribute and cannot be used as component prop. so i used styles to pass prop. |
Hey, @satyamkale27, thanks for following up.
Ah yes, I didn't mean you use it as a component prop, but rather as ordinary native inline
will translate into native HTML inline A simple parallel would be, let's say we'd have two nested divs
and now the task is to investigate what about the styles applied by Note that this doesn't necessarily reflect Please let me know if this helped to clarify. If you won't find a way to achieve so in this manner, we can return to the |
@MisRob thanks for your guidance, I have explored many methods to achive without passing prop , but none of them worked. |
Alright, thanks @satyamkale27, I will take a look |
@satyamkale27 I played around with it too a bit and like you, I haven't really discovered a way to achieve the first option in a reasonable time frame due to Popper. Thanks for your time investigating. Let's go with the |
@MisRob yeh sure, I will make a new commit soon. |
Thanks @satyamkale27, I think that just reverting to d82513c will work |
@MisRob I made a revert please take a look. in this case we can only use maxWidth not other styles, but if we pass styles prop as a object we can use other styles like color and so on, also including "max-width" as i done in previous commit 611, |
Thank you @satyamkale27. You're right that |
@MisRob yeh, thats good thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @satyamkale27, all good.
Before merging, I updated the changelog file and also documented the new prop because this section of the documentation page is auto-generated from the in-code docstrings
Thankyou that's look good. |
Description
This PR configures the maxWidth of KTooltip, If maxWidthis not passed it will maintain its current behavior of adjusting its size to fit its content
Issue addressed
#595
Addresses #PR# HERE
screenshots
If maxWidth is not passed, KTooltip will maintain its current behavior of adjusting its size to fit its content.
If maxWidth passes.
Changelog
[#PR no]: PR link
Steps to test
Run the KDS By
yarn dev
Past this code snippet to the playground.vue file in following path docs/pages /playground.vue
(optional) Implementation notes
At a high level, how did you implement this?
Briefly describe how this works
If the maxWidth is passed,the maxWidth will get applied. but if maxWidth is not passed it will continue its current behavior of adjusting its size to fit its content.
Testing checklist
Reviewer guidance
After review
CHANGELOG.md
Comments