-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Icon: Support size
prop for dashicons
#43724
Comments
In the Icon component, if the size property is to be applied to the dashicon, does this mean that the default font size will be 24px instead of the current 20px? Personally, I would expect the current default size (font size) to remain 20px when I believe the direction of this issue will help move #43574 forward 🙂 |
Yes, if it's agreed that dashicons can be deprecated, there's probably no good reason to add a "new feature" (even if it's kind of a bug fix) like customizable sizes. So if we're going to deprecate, I think keeping the current 20px size is reasonable 👍 I just wasn't sure if there would be pushback on deprecating dashicons, since I hear it's widely used by the community 😅 At least, the contributors to this repo generally seem to agree that it can/should be deprecated. (cc @ciampo for visibility) |
My preferred option would be to deprecate |
I would like to address this problem, but first I think it would be a good idea to rewrite the test from Enzyme to React Testing Library to clarify the current specifications. |
That would always be a good idea, as we're in the process of migrating from Enzyme to RTL for the whole repo :) |
Thank you! I'll work on refactoring the test first. |
I have submitted a PR regarding the refactoring of tests: #44051 |
What problem does this address?
The
size
prop does not work when theicon
is a dashicon string.What is your proposed solution?
Add some handling (either to the Dashicon or the Icon component) so it adds a
font-size
style equivalent to thesize
.The text was updated successfully, but these errors were encountered: