React/Javascript
I am working on a challenge involving a div element that contains a paragraph. This paragraph may vary in length, so I need to find a way to dynamically adjust the font size based on its length. If the paragraph is longer, I want to scale down the font size to ensure it fits within the div. Conversely, if the paragraph is shorter, I need to scale up the font size.
I have attempted using Scaletext for this purpose, but unfortunately, I was not able to achieve the desired outcome. It seems that Scaletext may not be suitable for solving my specific issue.
The parent div has predefined max width and height, making it responsive to different screen sizes.