<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import getValidProps from '@helpscout/react-utils/dist/getValidProps'
import { classNames } from '../../utilities/classNames'
import { noop } from '../../utilities/other'
import { <%= name %>UI } from './<%= name %>.css'

export class <%= name %> extends React.Component {
  constructor(props) {
    super(props)

    this.<%= name %>Ref = React.createRef()
  }

  getClassName() {
    const { className } = this.props
    
    return classNames(
      'c-<%= name %>',
      className
    )
  }

  render() {
    const { children, ref, ...rest } = this.props

    return (
      <<%= name %>UI
        {...getValidProps(rest)}
        className={this.getClassName()}
        ref={this.<%= name %>Ref}
      >
        {children}
      </<%= name %>UI>
    )
  }
}

<%= name %>.defaultProps = {
  'data-cy': '<%= name %>',
}

<%= name %>.propTypes = {<commit_msg>remove getvalidprops from component generator template<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { classNames } from '../../utilities/classNames'
import { noop } from '../../utilities/other'
import { <%= name %>UI } from './<%= name %>.css'

export class <%= name %> extends React.Component {
  constructor(props) {
    super(props)

    this.<%= name %>Ref = React.createRef()
  }

  getClassName() {
    const { className } = this.props
    
    return classNames(
      'c-<%= name %>',
      className
    )
  }

  render() {
    const { children, ref, ...rest } = this.props

    return (
      <<%= name %>UI
        {...rest}
        className={this.getClassName()}
        ref={this.<%= name %>Ref}
      >
        {children}
      </<%= name %>UI>
    )
  }
}

<%= name %>.defaultProps = {
  'data-cy': '<%= name %>',
}

<%= name %>.propTypes = {
{'fraction_non_alphanumeric': 0.19159388646288208, 'fraction_numerical': 0.0, 'mean_word_length': 2.419776119402985, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '2357849', 'n_tokens_mistral': 619, 'n_tokens_neox': 580, 'n_words': 139}