Skip to content
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

Multi mode does not appear to work #46

Open
kojow7 opened this issue May 25, 2019 · 3 comments
Open

Multi mode does not appear to work #46

kojow7 opened this issue May 25, 2019 · 3 comments

Comments

@kojow7
Copy link

kojow7 commented May 25, 2019

When I use single mode, the text fits perfectly in a single line. However, when I change the mode to "multi", it no longer seems to resize the text.

Below is an example of my code:


    return(
        <div style={{fontSize: '15px'}}>
            <div style={{margin: '10px', fontFamily: 'Times New Roman', border: 'solid black 2px', width: '200px', height: '80px'}}>
                <Textfit mode="multi">
                    The quick brown fox jumps over the lazy dog.  The quick brown fox jumps over the lazy dog.  The quick brown fox jumps over the lazy dog.
                </Textfit>
            </div>
        </div>
    )

A screenshot of what I am seeing:

image

Is this a problem with the module, or am I doing something wrong?

@ijaazt
Copy link

ijaazt commented Jul 6, 2019

I'm also having the same exact issue

@jathom30
Copy link

Try putting the height style directly on the Textfit component. That has worked for me.

@rmfarrell
Copy link

<TextFit style={{maxHeight: ...}} /> worked for me!

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

No branches or pull requests

4 participants