Last active
August 29, 2015 13:57
-
-
Save ku1ik/9722700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Line = React.createClass({ | |
render: function() { | |
return <span className="line">{this.props.text}</span>; | |
} | |
}); | |
var Terminal = React.createClass({ | |
render: function() { | |
var lines = this.props.lines.map(function(line) { | |
return <Line text={line} />; # how to add a new-line character after this? | |
}); | |
return <pre className="terminal">{lines}</pre>; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment