<commit_before>import React from 'react';
import ReactDom from 'react-dom';
import {UltimatePagination} from 'react-ultimate-pagination';

ReactDom.render(<UltimatePagination currentPage={1} totalPages={10}/>, document.getElementById('main'));<commit_msg>Add configuration form to an example<commit_after>import React from 'react';
import ReactDom from 'react-dom';
import {UltimatePagination} from 'react-ultimate-pagination';

class App extends React.Component {
  constructor() {
    super();

    this.onTotalPagesChange = this.onTotalPagesChange.bind(this);
    this.onCurrentPageChange = this.onCurrentPageChange.bind(this);

    this.state = {
      currentPage: 1,
      totalPages: 10
    };
  }

  onTotalPagesChange(event) {
    this.setState({totalPages: +event.target.value});
  }

  onCurrentPageChange(event) {
    this.setState({currentPage: +event.target.value});
  }

  render() {
    return (
      <div>
        <div>
          <label htmlFor="totalPages">Total pages:</label>
          <input
            type="number"
            id="totalPages"
            value={this.state.totalPages}
            min="1"
            onChange={this.onTotalPagesChange}
          />
        </div>


        <div>
          <label htmlFor="currentPage">Current page:</label>
          <input
            type="number"
            id="currentPage"
            value={this.state.currentPage}
            min="1"
            max={this.state.totalPages}
            onChange={this.onCurrentPageChange}
          />
        </div>

        <UltimatePagination currentPage={this.state.currentPage} totalPages={this.state.totalPages}/>
      </div>
    );
  }
}

ReactDom.render(<App />, document.getElementById('main'));
{'fraction_non_alphanumeric': 0.13131900058105753, 'fraction_numerical': 0.004648460197559558, 'mean_word_length': 2.6638297872340426, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '1814743', 'n_tokens_mistral': 507, 'n_tokens_neox': 498, 'n_words': 85}