import React from 'react'
import styles from './style.less'

const noop = x => x

export default (props) => {
  const { name, onClick = noop } = props
  const file = require(`@/assets/welcome/icon-${name}.png`)

  return (
    <div className={styles['icon-text']} onClick={onClick}>
      <img src={file} alt="" className={styles['icon-img']} />
      <div>
        {props.children}
      </div>
    </div>
  )
}
