/** @jsx React.DOM */ var LongMessage = createReactClass({ getInitialState: function(props) { return { expanded: false, }; }, render: function() { var length = this.props.length ? this.props.length : 50; var text = this.props.children; if (text.length > length) { if (this.state.expanded) { return (
{text}
{text.substring(0, length)}...
{text}