<commit_before>'use strict';

const React = require('react');
const generateID = require('../lib/elementstuff').generateID;

class RadioComponent extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      focused: false
    };
  }

  focus = () => {
    this.setState({focused: true});
  };

  blur = () => {
    this.setState({focused: false});
  };

  render() {
    const id = generateID();

    let className = 'block-label';
    if (this.props.checked) className += ' selected';
    if (this.state.focused) className += ' focused';

    return (
      <label
        className={className}
        htmlFor={id}
        onBlur={this.blur}
        onFocus={this.focus}
      >
        <input
          id={id}
          type="radio"<commit_msg>DHE-298 fix compatibility with new GDS radio buttons<commit_after>'use strict';

const React = require('react');
const generateID = require('../lib/elementstuff').generateID;

class RadioComponent extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      focused: false
    };
  }

  focus = () => {
    this.setState({focused: true});
  };

  blur = () => {
    this.setState({focused: false});
  };

  render() {
    const id = generateID();

    let className = 'block-label selection-button-radio';
    if (this.props.checked) className += ' selected';
    if (this.state.focused) className += ' focused';

    return (
      <label
        className={className}
        htmlFor={id}
        onBlur={this.blur}
        onFocus={this.focus}
      >
        <input
          id={id}
          type="radio"
{'fraction_non_alphanumeric': 0.15228113440197288, 'fraction_numerical': 0.0018495684340320592, 'mean_word_length': 2.453191489361702, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3725903', 'n_tokens_mistral': 499, 'n_tokens_neox': 478, 'n_words': 101}