conorhastings / react-native-syntax-highlighter

a syntax highlighter for react native using https://github.com/conorhastings/react-syntax-highlighter under the hood
MIT License
167 stars 25 forks source link

fontSize prop does not seem to work #5

Closed zandernelson closed 6 years ago

zandernelson commented 6 years ago

When I set the fontSize prop the font is not affected, but the margin between the lines seems to be affected.

export default class App extends React.Component {
  render() {
    return (
      <View>
        <SyntaxHighlighter 
        language='javascript'
        fontFamily='Courier'
        fontSize={45}
        style={docco}
        >
        {"function(num){\n\tconsole.log(num)\n}"}
        </SyntaxHighlighter>
      </View>
    );
  }
}

Result. Notice large space between the lines. I messed around with the src code and adjusting the default parameter value for the fontSize seemed to change the size. Not sure what the fix is though, new to React.

image1

conorhastings commented 6 years ago

@zander312 thanks for the issue! I'll try to take a look this weekend

conorhastings commented 6 years ago

fixed in v1.2.3 , thanks for the issue!