<commit_before>import React, { Component } from 'react';
import CheckList from './CheckList';

class Card extends Component {
  constructor() {
    super(...arguments);
    this.state = {
      showDetails: false
    }
  }

  toggleDetails() {
    this.setState({
      showDetails: !this.state.showDetails
    });
  }

  render() {
    let cardDetails;
    if (this.state.showDetails) {
      cardDetails = (
        <div className="card__details">
          { this.props.description }
          <CheckList cardId={ this.props.id } tasks={ this.props.tasks } />
        </div>

      )
    }
    return ( <div className="card">
               <div className="card__title" onClick={this.toggleDetails.bind(this)}>
                 { this.props.title }
               </div>
               { cardDetails }
             </div> );
  }
}
export default Card;<commit_msg>add a className conditionally to the Card Title with ternary expression<commit_after>import React, { Component } from 'react';
import CheckList from './CheckList';

class Card extends Component {
  constructor() {
    super(...arguments);
    this.state = {
      showDetails: false
    }
  }

  toggleDetails() {
    this.setState({
      showDetails: !this.state.showDetails
    });
  }

  render() {
    let cardDetails;
    if (this.state.showDetails) {
      cardDetails = (
        <div className="card__details">
          { this.props.description }
          <CheckList cardId={ this.props.id } tasks={ this.props.tasks } />
        </div>

      )
    }
    return ( <div className="card">
               <div className={ this.state.showDetails ? "card__title card__title--is-open" : "card__title" } onClick={ this.toggleDetails.bind(this) }>
                 { this.props.title }
               </div>
               { cardDetails }
             </div> );
  }
}
export default Card;
{'fraction_non_alphanumeric': 0.1318622174381055, 'fraction_numerical': 0.0, 'mean_word_length': 2.062602965403624, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5467582', 'n_tokens_mistral': 533, 'n_tokens_neox': 526, 'n_words': 114}