<commit_before>import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { GREY_3, BLACK } from 'govuk-colours'
import { SPACING, FONT_SIZE } from '@govuk-react/constants'

const StyledButton = styled('button')`
  display: inline-table;
  padding: 12px;
  margin: 4px;
  background-color: ${GREY_3};
  border-radius: ${SPACING.SCALE_2};
  border: 1px solid ${BLACK};
  vertical-align: middle;
  cursor: pointer;
  span {
    pointer-events: none;
    display: table-cell;
    font-size: ${FONT_SIZE.SIZE_16};
  }
  span:first-child {
    text-transform: ${({ onClick }) => onClick && `uppercase`};
    padding-right: ${({ onClick }) => onClick && `8px`};
  }
`

const Chip = ({ children, value, onClick = null }) => (
  <StyledButton onClick={onClick} data-value={value}>
    {onClick && <span>x</span>}
    <span>{children}</span>
  </StyledButton>
)

Chip.propTypes = {
  children: PropTypes.node.isRequired,
  value: PropTypes.string.isRequired,
  onClick: PropTypes.func,
}

export default Chip
<commit_msg>Update styles on chip<commit_after>import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { GREY_3, BLACK } from 'govuk-colours'
import { SPACING, FONT_SIZE } from '@govuk-react/constants'

const StyledButton = styled('button')`
  display: inline-table;
  padding: 12px;
  margin: 4px;
  background-color: ${GREY_3};
  border-radius: ${SPACING.SCALE_1};
  border: 1px solid ${BLACK};
  vertical-align: middle;
  cursor: pointer;
  span {
    pointer-events: none;
    display: table-cell;
    font-size: ${FONT_SIZE.SIZE_16};
  }
  span:first-child {
    text-transform: ${({ onClick }) => onClick && `uppercase`};
    padding-right: ${({ onClick }) => onClick && `8px`};
    font-weight: ${({ onClick }) => onClick && `700`};
  }
`

const Chip = ({ children, value, onClick = null }) => (
  <StyledButton onClick={onClick} data-value={value}>
    {onClick && <span>✕</span>}
    <span>{children}</span>
  </StyledButton>
)

Chip.propTypes = {
  children: PropTypes.node.isRequired,
  value: PropTypes.string.isRequired,
  onClick: PropTypes.func,
}

export default Chip

{'fraction_non_alphanumeric': 0.16170407695831424, 'fraction_numerical': 0.010535959688502062, 'mean_word_length': 4.138823529411765, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 22, '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': '3294945', 'n_tokens_mistral': 769, 'n_tokens_neox': 750, 'n_words': 171}