import React from 'react' ; import { camelCase } from 'lodash' ; import { EuiIcon , IconSize } from '@elastic/eui' ; import { images } from '../assets/source_icons' ; interface SourceIconProps { serviceType : string ; name : string ; className ? : string ; size ? : IconSize ; } export const SourceIcon = ( { name , serviceType , className , size } ) => ( < EuiIcon type = { images [ camelCase ( serviceType ) ] } title = { `${ name } logo` } className = { className } size = { size } / > ) ;