import React,{ Component } from "react";

class AttachmentsList extends Component{
  constructor(props){
    super(props);
  }
  render(){
    let { attachments } = this.props;
    return(
      <React.Fragment>
        {
          attachments.map((item,key)=>{
            return(
              <p key={key}>
                <a className="color-grey">
                  <i className="font-14 color-green iconfont icon-fujian mr8"></i>
                </a>
                {
                  item.is_pdf && item.is_pdf == true ?
                  <a href={item.url} className="mr12" length="58" target="_blank">{item.title}</a>
                  :
                  <a href={item.url} className="mr12" length="58">{item.title}</a>
                }
                <span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
              </p>
            )
          })
        }
      </React.Fragment>
    )
  }
}
export default AttachmentsList;