<commit_before>import React from 'react'
import classnames from 'classnames'

import plateSingleSrc from '../img/labware/plate_single.png'
import troughSingleSrc from '../img/labware/trough_single.png'
import tiprackSingleSrc from '../img/labware/tiprack_single.png'

export default function Diagram (props) {
  const {isTiprack, type} = props
  const style = classnames('flex', 'flex__items_center', 'flex__justify_center')
  let labwareSrc
  if (isTiprack) {
    labwareSrc = tiprackSingleSrc
  } else if (type.includes('trough')) {
    labwareSrc = troughSingleSrc
  } else {
    labwareSrc = plateSingleSrc
  }

  return (
    <div className={style}>
      <img src={labwareSrc} />
    </div>
  )
}<commit_msg>diagram proptypes<commit_after>import React from 'react'
import classnames from 'classnames'
import PropTypes from 'prop-types'

import plateSingleSrc from '../img/labware/plate_single.png'
import troughSingleSrc from '../img/labware/trough_single.png'
import tiprackSingleSrc from '../img/labware/tiprack_single.png'

export default function Diagram (props) {
  const {isTiprack, type} = props
  const style = classnames('flex', 'flex__items_center', 'flex__justify_center')
  let labwareSrc
  if (isTiprack) {
    labwareSrc = tiprackSingleSrc
  } else if (type.includes('trough')) {
    labwareSrc = troughSingleSrc
  } else {
    labwareSrc = plateSingleSrc
  }

  return (
    <div className={style}>
      <img src={labwareSrc} />
    </div>
  )
}

Diagram.propTypes = {
  isTiprack: PropTypes.bool.isRequired,
  type: PropTypes.string.isRequired
}
{'fraction_non_alphanumeric': 0.11607142857142858, 'fraction_numerical': 0.0, 'mean_word_length': 4.247491638795987, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7529591', 'n_tokens_mistral': 521, 'n_tokens_neox': 504, 'n_words': 118}