import React, { PropTypes } from 'react';
import { createSelector } from 'reselect';
import { connect } from 'react-redux';
import PureComponent from 'react-pure-render/component';
import { Col, Row } from 'react-bootstrap';
import TestSuite from './Test-Suite.jsx';
import Output from './Output.jsx';
import ToolPanel from './Tool-Panel.jsx';
const mapStateToProps = createSelector(
state => state.app.windowHeight,
state => state.app.navHeight,
(windowHeight, navHeight) => ({ height: windowHeight - navHeight - 50 })
);
/* eslint-disable max-len */
const description = [
'Comments are lines of code that JavaScript will intentionally ignore. Comments are a great way to leave notes to yourself and to other people who will later need to figure out what that code does.',
'There are two ways to write comments in JavaScript:',
'Using //
will tell JavaScript to ignore the remainder of the text on the current line:',
'
// This is an in-line comment.', 'You can make a multi-line comment beginning with
/*
and ending with */
:',
'/* This is a', 'Best Practice
multi-line comment */
{ if (descriptionRegex.test(line)) { return ( ); } return ( ); }); } render() { const { height } = this.props; const style = { overflowX: 'hidden', overflowY: 'auto' }; if (height) { style.height = height + 'px'; } return (); } } export default connect(mapStateToProps)(SidePanel);Build JavaScript Objects
|
{ this.renderDescription(description, this.descriptionRegex) }