Skip to content

feat: Add maxScale property#40

Open
WITS wants to merge 4 commits intoshuding:mainfrom
WITS:main
Open

feat: Add maxScale property#40
WITS wants to merge 4 commits intoshuding:mainfrom
WITS:main

Conversation

@WITS
Copy link

@WITS WITS commented Feb 9, 2023

This adds a maxScale property to the <Balancer> component that allows it to scale text to be larger (up to maxScale * fontSize) so that the edges of the widest line will be flush to the edges of the container. If this property is not explicitly set, it defaults to 1 and behaves the same as before.

@vercel
Copy link

vercel bot commented Feb 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-wrap-balancer ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 9, 2023 at 4:28AM (UTC)

@WITS WITS marked this pull request as ready for review February 9, 2023 04:30
Copy link
Owner

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - appreciate your PR as well as updating the website! These changes look good to me but I'm not sure about adding this to the lib. I can't think of a common use case, and it's not really related to wrap balancing — maybe you can create a fork and share some use cases to see if there're more people interested adding it upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants