<commit_before>import React, { Component } from 'react';
import {expansions} from '../data.filters';

export class ExpansionFilter extends Component {
  render() {
    return (
        <div>
          <h3>Dodatki</h3>
          <ul className="">
            {expansions.map((element, index) =>
                <li className={element} value={element} key={index}>
                  <span className={`hs icon-${element}`}></span>
                </li>
            )}
          </ul>
        </div>
    );
  }
}<commit_msg>+ Added click state on expansion filter<commit_after>import React, { Component } from 'react';
import {expansions} from '../data.filters';

export class ExpansionFilter extends Component {
  constructor(props) {
    super(props);

    this.state = {active: null};
  }
  handleClick(i) {
    let isActive = this.state.active === i ? null : i;
    this.setState({active: isActive});
  }
  render() {
    return (
        <div>
          <h3>Dodatki</h3>
          <ul className="">
            {expansions.map((element, index) =>
                <li onClick={this.handleClick.bind(this, index)} className={`${element} ${this.state.active === index && 'icon-active'}`} value={element} key={index}>
                  <span className={`hs icon-${element}`}></span>
                </li>
            )}
          </ul>
        </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.1661764705882353, 'fraction_numerical': 0.0029411764705882353, 'mean_word_length': 2.0861678004535147, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '4995995', 'n_tokens_mistral': 413, 'n_tokens_neox': 402, 'n_words': 89}