I am using react-syntax-highlighter and I am having one problem I am trying to write some styles inside jsx namely paddingLeft: 0
. But the problem is that the syntax theme is specified inside style, it looks like this
<SyntaxHighlighter
language="javascript"
style={docco}
wrapLines={true}
showLineNumbers={true}
codeTagProps={{style: {fontFamily: "inherit"}}}
>
{codeString}
</SyntaxHighlighter>
Please pay attention to the code style={docco}
, inside style i want to apply paddingLeft
but don't quite understand how
In react-syntax-highlighter they provide a property name
customStyle
it will be combined with the top-level style on the pre-tag, styles here will overwrite earlier styles.