<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const AnswerSet = styled.div`
  display: flex;
  flex-wrap: nowrap;

  @media (min-width: ${props => props.theme.screenSize.desktop}) {
  }
`;

function AnswerGroup({
  name,
  children,
  itemWidth,
  styleType,
  selectedType,
  ...rest
}) {
  const renderButtons = () =>
    React.Children.map(children, (child, index) => {
      const key = `${name}-option-${index + 1}`;
      return React.cloneElement(child, {
        key,
        name,
        itemWidth,
        styleType,
        selectedType,
        ...rest
      });
    });

  return <AnswerSet>{renderButtons()}</AnswerSet>;
}

AnswerGroup.propTypes = {
  /** The name of the radio group */
  name: PropTypes.string.isRequired,
  children: PropTypes.node.isRequired,
  itemWidth: PropTypes.string,
  styleType: PropTypes.string,
  selectedType: PropTypes.string
};

AnswerGroup.defaultProps = {
  styleType: 'primary',
  selectedType: 'success',
  itemWidth: '75px'
};

export default AnswerGroup;<commit_msg>New: added documenation for props<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

const AnswerSet = styled.div`
  display: flex;
  flex-wrap: nowrap;

  @media (min-width: ${props => props.theme.screenSize.desktop}) {
  }
`;

function AnswerGroup({
  name,
  children,
  itemWidth,
  styleType,
  selectedType,
  ...rest
}) {
  const renderButtons = () =>
    React.Children.map(children, (child, index) => {
      const key = `${name}-option-${index + 1}`;
      return React.cloneElement(child, {
        key,
        name,
        itemWidth,
        styleType,
        selectedType,
        ...rest
      });
    });

  return <AnswerSet>{renderButtons()}</AnswerSet>;
}

AnswerGroup.propTypes = {
  /** The name of the answer group */
  name: PropTypes.string.isRequired,
  children: PropTypes.node.isRequired,
  /** The width of each item when in desktop view */
  itemWidth: PropTypes.string,
  /** Select the color style of the buttons, types come from theme */
  styleType: PropTypes.string,
  /** Select the color style of the selected button, types come from theme */
  selectedType: PropTypes.string
};

AnswerGroup.defaultProps = {
  styleType: 'primary',
  selectedType: 'success',
  itemWidth: '75px'
};

export default AnswerGroup;
{'fraction_non_alphanumeric': 0.13372093023255813, 'fraction_numerical': 0.0024916943521594683, 'mean_word_length': 3.248677248677249, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '6274399', 'n_tokens_mistral': 742, 'n_tokens_neox': 744, 'n_words': 189}