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

font size config not working for MathText #49

Open
whitesnow9291 opened this issue Jul 22, 2021 · 6 comments
Open

font size config not working for MathText #49

whitesnow9291 opened this issue Jul 22, 2021 · 6 comments
Labels
question Further information is requested

Comments

@whitesnow9291
Copy link

config props works for MathView but not working for MathText

    <MathText
      value={props.math}
      config={{ ex: 50, em: 50 }}
      onError={e => console.log('ERROR!', e)}
      direction="ltr"
    />

This doesn't show big font.
Screenshot at Jul 23 00-29-31

And where can I see all the props?

@ShaMan123
Copy link
Owner

ShaMan123 commented Jul 23, 2021

You are right.
config isn't passed down:
https://github.com/ShaMan123/react-native-math-view/blob/master/src/MathText.tsx#L45

You are welcome to PR.

You can instead handle this with the CellRenderComponent.

<MathText 
    CellRenderComponent={props => <MathView {...props} config={{...props.config, em: 50}} 
/>

@Barklegne
Copy link

The above solution still doesn't work can you please explain a bit?

Thanks

@ShaMan123 ShaMan123 added the question Further information is requested label Aug 14, 2021
@ShaMan123
Copy link
Owner

Sorry, I don't have a lot of time left to maintain the repo.
You are welcome to PR:
Pass a config prop and merge it with inline prop
This should work

https://github.com/ShaMan123/react-native-math-view/blob/master/src/MathText.tsx#L45

@sickopickle
Copy link

Can you explain what you mean by merging it with inline prop? Have you applied this already into the package?

@ShaMan123
Copy link
Owner

Don't remember
Sorry
Follow the code
It should be a react fix, passing props

@sickopickle
Copy link

I just used mathview instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants