<commit_before>import React, { PropTypes } from 'react';
import classnames from 'classnames';

const propTypes = {
  className: PropTypes.string,
  children: PropTypes.node,
};

const CardActions = ({ className, children }) => {
  const actions = children && children.map((action, index) => {
    const actionClasses = action.props.className;
    const classes = classnames(actionClasses, 'mdc-card__action');
    return React.cloneElement(action, { key: index, className: classes });
  });

  return (
    <section
      className={classnames('mdc-card__actions', className)}
    >
      {actions}
    </section>
  );
};
CardActions.propTypes = propTypes;
export default CardActions;
<commit_msg>refactor(CardActions): allow single node in children<commit_after>import React, { PropTypes } from 'react';
import classnames from 'classnames';

const propTypes = {
  className: PropTypes.string,
  children: PropTypes.node,
};

const CardActions = ({ className, children }) => {
  const actions = React.Children.map(children, (action, index) => {
    const actionClasses = action.props.className;
    const classes = classnames(actionClasses, 'mdc-card__action');
    return React.cloneElement(action, { key: index, className: classes });
  });

  return (
    <section
      className={classnames('mdc-card__actions', className)}
    >
      {actions}
    </section>
  );
};
CardActions.propTypes = propTypes;
export default CardActions;

{'fraction_non_alphanumeric': 0.1301322199025748, 'fraction_numerical': 0.0, 'mean_word_length': 4.286764705882353, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '6055279', 'n_tokens_mistral': 404, 'n_tokens_neox': 407, 'n_words': 101}