react-native-training/react-native-syntax-highlighter

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

React Native Syntax Highlighter

Syntax highlighting component for React Native using react-syntax-highlighter

You can try it out with Expo here

Install

npm install react-native-syntax-highlighter --save

Use
props

Accepts all of the same props as react-syntax-highlighter with two additional props.

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>;  

Styles Available

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.