<commit_before>import PropTypes from 'prop-types';
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

class FilePicker extends React.Component {
  static propTypes = {
    id: PropTypes.string,
    className: PropTypes.string,
    label: PropTypes.string,
    mimeTypes: PropTypes.array,
    onFilesSelected: PropTypes.func,
  };

  filesPicked = (e) => {
    this.props.onFilesSelected(e.target.files);
  };

  render() {
    var classNames = ['file-picker'];

    if (this.props.className) {
      classNames.push(this.props.className);
    }

    return (
      <span id={this.props.id} className={classNames.join(' ')}>
        <label>
          <span className="btn btn-default" title="Pick files to upload">
            <FontAwesomeIcon icon="folder-open" />
            {this.props.label ? ` ${this.props.label}` : null}
          </span>
          <input type="file" multiple onChange={this.filesPicked} />
        </label>
      </span>
    );
  }
}

export default FilePicker;<commit_msg>fix addDocumentDialog button styling<commit_after>import PropTypes from 'prop-types';
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

class FilePicker extends React.Component {
  static propTypes = {
    id: PropTypes.string,
    className: PropTypes.string,
    label: PropTypes.string,
    mimeTypes: PropTypes.array,
    onFilesSelected: PropTypes.func,
  };

  filesPicked = (e) => {
    this.props.onFilesSelected(e.target.files);
  };

  render() {
    var classNames = ['file-picker'];

    if (this.props.className) {
      classNames.push(this.props.className);
    }

    return (
      <span id={this.props.id} className={classNames.join(' ')}>
        <label>
          <span className="btn btn-custom" title="Pick files to upload">
            <FontAwesomeIcon icon="folder-open" />
            {this.props.label ? ` ${this.props.label}` : null}
          </span>
          <input type="file" multiple onChange={this.filesPicked} />
        </label>
      </span>
    );
  }
}

export default FilePicker;
{'fraction_non_alphanumeric': 0.1397338403041825, 'fraction_numerical': 0.0, 'mean_word_length': 2.841240875912409, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '4138280', 'n_tokens_mistral': 643, 'n_tokens_neox': 640, 'n_words': 132}