{"size": 601, "ext": "js", "max_stars_repo_path": "components/general-ui/typeography/InsetText.js", "max_stars_repo_name": "uk-gov-mirror/companieshouse.ch-account-ui", "max_stars_repo_stars_event_min_datetime": "2021-11-19T14:51:28.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-19T14:51:28.000Z", "max_issues_repo_path": "components/general-ui/typeography/InsetText.js", "max_issues_repo_name": "uk-gov-mirror/companieshouse.ch-account-ui", "max_issues_repo_issues_event_min_datetime": "2021-07-15T09:44:33.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-15T09:44:33.000Z", "max_forks_repo_path": "components/general-ui/typeography/InsetText.js", "max_forks_repo_name": "uk-gov-mirror/companieshouse.ch-account-ui", "max_forks_repo_forks_event_min_datetime": "2021-04-10T21:11:19.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-10T21:11:19.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 20.724137931, "max_line_length": 60, "alphanum_fraction": 0.6738768719}
import PropTypes from 'prop-types'
import React from 'react'

const InsetText = (props) => {
  const { children, className = '', renderFeatures } = props
  const classes = [className]
  const finalClassName = classes.join(' ').trim()

  return (
    <div className={`govuk-inset-text ${finalClassName}`}>
      {children}
      {renderFeatures(props)}
    </div>
  )
}

export default InsetText

InsetText.propTypes = {
  children: PropTypes.node,
  className: PropTypes.string,
  renderFeatures: PropTypes.func
}

InsetText.defaultProps = {
  className: '',
  renderFeatures: () => { return null }
}
