<commit_before>import React, { Component, PropTypes } from 'react';
import injectSheet from 'react-jss';
import channelHeaderStyleSheet from '../style/channel-header';
import getClassNames from '../internal/get-class-names';

class ChannelHeader extends Component {
  static propTypes = {
    name: PropTypes.string.isRequired,
    rightButton: PropTypes.node,
    sheet: PropTypes.shape({
      classes: PropTypes.shape({
        header: PropTypes.string.isRequired,
        headerText: PropTypes.string.isRequired,
        button: PropTypes.string.isRequired
      }).isRequired
    }).isRequired,
    style: PropTypes.instanceOf(Object),
    headerTextStyle: PropTypes.instanceOf(Object)
  }

  static defaultProps = {
    style: {},
    headerTextStyle: {},
    rightButton: null
  }

  constructor(props) {
    super(props);

    const { sheet: { classes }, style, headerTextStyle } = props;

    const headerClassName = getClassNames(classes, style, 'header', 'ChannelHeader');
    const textClassName = getClassNames(classes, headerTextStyle, 'headerText', 'ChannelHeader');

    this.state = {
      textClassName,
      headerClassName
    };
  }

  render() {
    const { name, rightButton, sheet: { classes } } = this.props;
    const { textClassName, headerClassName } = this.state;

    return (
      <header className={headerClassName}>
        <h1 className={textClassName}>{name}</h1>
        {rightButton ? <div className={classes.button}>{rightButton}</div> : null}
      </header>
    );
  }
}

export default injectSheet(channelHeaderStyleSheet)(ChannelHeader);<commit_msg>:hankey: Forgot button styles Added button styles prop.<commit_after>import React, { Component, PropTypes } from 'react';
import injectSheet from 'react-jss';
import channelHeaderStyleSheet from '../style/channel-header';
import getClassNames from '../internal/get-class-names';

class ChannelHeader extends Component {
  static propTypes = {
    name: PropTypes.string.isRequired,
    rightButton: PropTypes.node,
    sheet: PropTypes.shape({
      classes: PropTypes.shape({
        header: PropTypes.string.isRequired,
        headerText: PropTypes.string.isRequired,
        button: PropTypes.string.isRequired
      }).isRequired
    }).isRequired,
    style: PropTypes.instanceOf(Object),
    headerTextStyle: PropTypes.instanceOf(Object),
    rightButtonStyle: PropTypes.instanceOf(Object)
  }

  static defaultProps = {
    style: {},
    headerTextStyle: {},
    rightButtonStyle: {},
    rightButton: null
  }

  constructor(props) {
    super(props);

    const { sheet: { classes }, style, headerTextStyle, rightButtonStyle } = props;

    const headerClassName = getClassNames(classes, style, 'header', 'ChannelHeader');
    const textClassName = getClassNames(classes, headerTextStyle, 'headerText', 'ChannelHeader');
    const rightButtonClassName = getClassNames(classes, rightButtonStyle, 'button', 'ChannelHeader');

    this.state = {
      textClassName,
      headerClassName,
      rightButtonClassName
    };
  }

  render() {
    const { name, rightButton } = this.props;
    const { textClassName, headerClassName, rightButtonClassName } = this.state;

    return (
      <header className={headerClassName}>
        <h1 className={textClassName}>{name}</h1>
        {rightButton ? <div className={rightButtonClassName}>{rightButton}</div> : null}
      </header>
    );
  }
}

export default injectSheet(channelHeaderStyleSheet)(ChannelHeader);
{'fraction_non_alphanumeric': 0.11864896073903003, 'fraction_numerical': 0.0011547344110854503, 'mean_word_length': 3.766162310866575, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '502585', 'n_tokens_mistral': 934, 'n_tokens_neox': 939, 'n_words': 210}