-
Notifications
You must be signed in to change notification settings - Fork 715
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
Question about scaleToFit behavior #1360
Comments
Hey @kyythane 👋 thanks for checking out I'm definitely happy to review a PR! modifying |
Thanks for the quick reply! Sounds good. I'll get a PR together tomorrowish. |
@williaster Will I need to do anything to update the docs or are those generated? |
sweet! 🙏 I'll try to take a look asap, either today or tomorrow. you shouldn't need to update the docs if the typings are updated (looks like they are). the only other possible addition would be to add a demo of the functionality to the |
If I get time, I'll make an update to the demo later today. I guess the easiest change would be replacing the checkbox with a dropdown. |
@williaster I made the change, unfortunately, I can't get the demo to run locally.
I assume I skipped a step somewhere, but I don't see anything in the local development instructions? |
closed by #1362 |
Hello! I was hoping to use the
scaleToFit
option onText
to shrink the font-size of a number if it was longer than the space available to display it. Unfortunately, it appears that the behavior ofscaleToFit
scales the size of the text up as well.Is there an existing workaround to do what I need via
Text
(only shrink the size if it is too long)?If not, would you be open to a PR that adds this option?
Though, I am not certain the best way to add it. Adding a second prop seems somewhat clunky. Updating the existing prop to have
shrink-only
(or something similar) would be more ergonomic, but might be awkward to do in a backward-compatible way.The text was updated successfully, but these errors were encountered: