import React from 'react';

import { Button, Modal } from 'antd';

function SSHDetail({visible , onCancel , desc }) {
  return(
    <Modal
      visible={visible}
      onCancel={onCancel}
      title={"SSH密钥详情"}
      width="600px"
      footer={null}
      className={"descModal"}
    >
      <div>
        <p className="color-grey-3 font-16 keysTitle">
          <span style={{fontWeight:"600"}}>SSH Key：</span>
          <span>{desc && desc.name}</span>
        </p>
        <p className="mt5">添加时间：{desc && desc.created_time}</p>
        <p className="color-grey-3 mt30 keysTitle mb15">
          <span style={{fontWeight:"600"}}>公钥指纹：</span>
          <span>{desc && desc.fingerprint}</span>
        </p>
        <div className="keyContent">{desc && desc.content}</div>
        <div className="edu-txt-center mt30 mb20"><Button type={"primary"} size="large" style={{width:"100px"}} onClick={onCancel}>关闭</Button></div>
      </div>
    </Modal>
  )
}
export default SSHDetail;