<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { default as IconButtonBase } from '@material-ui/core/IconButton';

export const IconButton = props => {
  const { icon: Icon, label, ...buttonProps } = props;
  const StyledIconButton = styled(IconButtonBase)`
    padding: 0;

    &:hover,
    &:focus,
    &:active {
      background: none;
    }
  `;

  return (
    <StyledIconButton disableFocusRipple disableRipple aria-label={label} {...buttonProps}>
      <Icon />
    </StyledIconButton>
  );
};

IconButton.propTypes = {
  icon: PropTypes.elementType.isRequired,
  label: PropTypes.string.isRequired,
};

export default IconButton;<commit_msg>[WEB-590] Move StyledIconButton definition to outside of rendered component<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { default as IconButtonBase } from '@material-ui/core/IconButton';

const StyledIconButton = styled(IconButtonBase)`
  padding: 0;

  &:hover,
  &:focus,
  &:active {
    background: none;
  }
`;

export const IconButton = props => {
  const { icon: Icon, label, ...buttonProps } = props;

  return (
    <StyledIconButton disableFocusRipple disableRipple aria-label={label} {...buttonProps}>
      <Icon />
    </StyledIconButton>
  );
};

IconButton.propTypes = {
  icon: PropTypes.elementType.isRequired,
  label: PropTypes.string.isRequired,
};

export default IconButton;
{'fraction_non_alphanumeric': 0.12574850299401197, 'fraction_numerical': 0.00332667997338656, 'mean_word_length': 4.098305084745762, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6798907', 'n_tokens_mistral': 475, 'n_tokens_neox': 459, 'n_words': 115}