import React, { useState } from 'react';
import styled from 'styled-components';
import Modals from './Modals';


const ALink = styled.a`{
  color:#F73030!important;
}`
function LeaveTeam({ teamID , onOk , className }){
  const [ visible , setVisible ] = useState(false);

  return(
    <React.Fragment>
      <ALink className={className} onClick={()=>setVisible(true)}>离开团队</ALink>
      <Modals visible={visible} okText={"确定"} cancelText={"取消"} onCancel={()=>setVisible(false)} onOk={()=>onOk(teamID)}> 
        <p className="font-16 edu-txt-center">确定要离开当前团队吗？</p>
      </Modals>
    </React.Fragment>
  )
}
export default LeaveTeam;