<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import Button, { IconButton } from '../button';
import cx from 'classnames';
import theme from './theme.css';
import { IconCloseMediumOutline, IconCloseSmallOutline } from '@teamleader/ui-icons';

class Tag extends PureComponent {
  static propTypes = {
    className: PropTypes.string,
    inverse: PropTypes.bool,
    label: PropTypes.string.isRequired,
    onLabelClick: PropTypes.func,
    onRemoveClick: PropTypes.func,
    size: PropTypes.oneOf(['small', 'medium', 'large']),
  };

  static defaultProps = {
    inverse: false,
    size: 'medium',
  };

  render() {
    const { className, inverse, label, onLabelClick, onRemoveClick, size, ...others } = this.props;

    const classNames = cx(
      theme['tag'],
      theme[`is-${size}`],
      {
        [theme['is-removable']]: onRemoveClick,
        [theme['is-inverse']]: inverse,
      },
      className,
    );

    const closeButtonColor= inverse ? 'white' : 'neutral';
    const closeButtonIcon = size === 'large' ? <IconCloseMediumOutline /> : <IconCloseSmallOutline />

    return (
      <Box className={classNames} data-teamleader-ui="tag" {...others}>
        {onLabelClick ? (
          <Button className={theme['label-button']} onClick={onLabelClick} level="outline" inverse={inverse}>
            {label}
          </Button>
        ) : (
          <span className={theme['label']}>{label}</span>
        )}

        {onRemoveClick && (
          <IconButton
            className={theme['remove-button']}
            color={closeButtonColor}
            icon={closeButtonIcon}
            onClick={onRemoveClick}
            size="small"
          />
        )}
      </Box>
    );
  }
}

export default Tag;<commit_msg>Prettier Linting™<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import Button, { IconButton } from '../button';
import cx from 'classnames';
import theme from './theme.css';
import { IconCloseMediumOutline, IconCloseSmallOutline } from '@teamleader/ui-icons';

class Tag extends PureComponent {
  static propTypes = {
    className: PropTypes.string,
    inverse: PropTypes.bool,
    label: PropTypes.string.isRequired,
    onLabelClick: PropTypes.func,
    onRemoveClick: PropTypes.func,
    size: PropTypes.oneOf(['small', 'medium', 'large']),
  };

  static defaultProps = {
    inverse: false,
    size: 'medium',
  };

  render() {
    const { className, inverse, label, onLabelClick, onRemoveClick, size, ...others } = this.props;

    const classNames = cx(
      theme['tag'],
      theme[`is-${size}`],
      {
        [theme['is-removable']]: onRemoveClick,
        [theme['is-inverse']]: inverse,
      },
      className,
    );

    const closeButtonColor = inverse ? 'white' : 'neutral';
    const closeButtonIcon = size === 'large' ? <IconCloseMediumOutline /> : <IconCloseSmallOutline />;

    return (
      <Box className={classNames} data-teamleader-ui="tag" {...others}>
        {onLabelClick ? (
          <Button className={theme['label-button']} onClick={onLabelClick} level="outline" inverse={inverse}>
            {label}
          </Button>
        ) : (
          <span className={theme['label']}>{label}</span>
        )}

        {onRemoveClick && (
          <IconButton
            className={theme['remove-button']}
            color={closeButtonColor}
            icon={closeButtonIcon}
            onClick={onRemoveClick}
            size="small"
          />
        )}
      </Box>
    );
  }
}

export default Tag;
{'fraction_non_alphanumeric': 0.14865606143719146, 'fraction_numerical': 0.0, 'mean_word_length': 2.6727089627391742, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '472865', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1048, 'n_words': 228}