-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
feat(VBtn): add iconSize prop #16550
Conversation
Currently the implementation breaks the scaling of the button when the icon overflows: Before solving this issue, I prefer to validate that this approach could be valid/correct, since the Btn implementation has many dependencies and there might be quite a few things I am missing. I would also like to hear thoughts about potentially using the same |
Thanks, @KaelWD for the clarification! Is this something still available to work? I am not a SASS expert but can give it a try. Do we have any capability for Cypress Stories to generate some Visual testing? This feature seems a good candidate for that. |
Oh, also to clarify further, @KaelWD this means that |
It's pretty complex with size+density so I don't have high hopes that you'll be able to solve it, you're always welcome to try though.
Yes, the last test ("Showcase") is a percy snapshot. I don't think it's publicly accessible but you can add new stories to it and ask me to run them. You can see how it looks at least with
Correct. Size presets ( |
Makes sense. It might become a bit of a rabbit hole to rewrite that mixin, I'll close this PR and pick something else 👍
Good to know! |
Description
Starting point to discuss the potential implementation of
iconSize
prop and its behaviourThe problem
Currently,
<VIcon />
rendered from the<VBtn />
do not receive anysize
prop, and therefore they don't scale accordingly to the users' needs.One potential approach would be to automatically scale with the same sizes provided to the
<VBtn />
, but it would limit the ability for the user to customize the look for built-in icons.The alternative approach is to add a new
iconSize
prop to the<VBtn />
(and potentially replicate this approach to other components that leverage icons?).Open to thoughts and considerations.
Related issues
closes #16288