Manual Reference Source
import HighlightText from 'cloudify-stage/basic/HighlightText.js'
public class | source

HighlightText

Extends:

react~Component → HighlightText

HighlightText component displays code with language-specific keyword highlighting

Supported languages

HighlightText is based of highlightJS and supports the following languages/notations:

  • Bash
  • JavaScript
  • JSON
  • Python
  • YAML

Access

Stage.Basic.HighlightText

Usage

HighlightText (JavaScript)

HighlightText

<HighlightText className="javascript" children={"if ( arguments.length == 0 ) \n   console.log('undefined');"}/>

Static Member Summary

Static Public Members
public static

Static Public Members

public static propTypes: * source

Properties:

NameTypeAttributeDescription
children object[]
  • optional

Text to be displayed

className string
  • optional
  • default: 'json'

Language name (used for code highlighting)