Name: react-native-syntax-highlighter
Owner: React Native Training
Description: a syntax highlighter for react native using https://github.com/conorhastings/react-syntax-highlighter under the hood
Forked from: conorhastings/react-native-syntax-highlighter
Created: 2017-05-07 13:35:04.0
Updated: 2018-02-28 09:41:55.0
Pushed: 2017-05-07 14:09:40.0
Homepage: null
Size: 2725
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Syntax highlighting component for React Native
using react-syntax-highlighter
You can try it out with Expo here
npm install react-native-syntax-highlighter --save
Accepts all of the same props as react-syntax-highlighter
with two additional props.
fontFamily
- the font family to use for syntax text.fontSize
- the fontSize for syntax text.rt SyntaxHighlighter from 'react-native-syntax-highlighter';
rt { docco } from 'react-syntax-highlighter/dist/styles';
t Component = () => {
nst codeString = '(num) => num + 1';
turn <SyntaxHighlighter language='javascript' style={docco}>{codeString}</SyntaxHighlighter>;