Floppy/dataslate

View on GitHub
src/components/KillTeam2018/CategoryIcon.tsx

Summary

Maintainability
A
1 hr
Test Coverage
import React from 'react'

interface Props {
  category: string
}

export function CategoryIcon (props: Props): JSX.Element {
  return (props.category !== '' && props.category.toLowerCase() !== 'specialist' && props.category.toLowerCase() !== 'specialist retainer'
    ? <img className='category' style={{ height: '1em', marginRight: '10px' }} alt={props.category} src={`/icons/${props.category.toLowerCase()}.svg`} />
    : <></>
  )
}