import React from 'react';
import './index.less'

import IconFont from '../../../themeComponents/IconFont';

const CardTip = ({hasScore, hasAid, score}) => {
  return (
    <div className="library-card-tip">
      {hasScore && score && (
        <span className="library-card-score">
          {`${score >= 100 ? 99 : parseInt(score)}%`}
        </span>
      )}
      {hasAid && (
        <span className="library-card-aid">
          <IconFont type="icon-S_View_FilePerson" />
        </span>
      )}
    </div>
  )
}

export default CardTip;